Last active
March 10, 2025 00:25
-
-
Save codigoconjuan/92e8a52abc8bd9ea5b81e5ad664d8ef0 to your computer and use it in GitHub Desktop.
Modal para los gastos de la app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Fragment } from 'react' | |
import { PlusCircleIcon } from '@heroicons/react/24/solid' | |
import { Dialog, Transition } from '@headlessui/react' | |
export default function ExpenseModal() { | |
return ( | |
<> | |
<div className="fixed right-5 bottom-5 flex items-center justify-center"> | |
<button | |
type="button" | |
> | |
<PlusCircleIcon className='w-16 h-16 text-blue-600 rounded-full' /> | |
</button> | |
</div> | |
<Transition appear show={false} as={Fragment}> | |
<Dialog as="div" className="relative z-10" onClose={() => {}}> | |
<Transition.Child | |
as={Fragment} | |
enter="ease-out duration-300" | |
enterFrom="opacity-0" | |
enterTo="opacity-100" | |
leave="ease-in duration-200" | |
leaveFrom="opacity-100" | |
leaveTo="opacity-0" | |
> | |
<div className="fixed inset-0 bg-black bg-opacity-75" /> | |
</Transition.Child> | |
<div className="fixed inset-0 overflow-y-auto"> | |
<div className="flex min-h-full items-center justify-center p-4 text-center"> | |
<Transition.Child | |
as={Fragment} | |
enter="ease-out duration-300" | |
enterFrom="opacity-0 scale-95" | |
enterTo="opacity-100 scale-100" | |
leave="ease-in duration-200" | |
leaveFrom="opacity-100 scale-100" | |
leaveTo="opacity-0 scale-95" | |
> | |
<Dialog.Panel className="w-full max-w-3xl transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all"> | |
</Dialog.Panel> | |
</Transition.Child> | |
</div> | |
</div> | |
</Dialog> | |
</Transition> | |
</> | |
) | |
} |
Muy Util
Muchas gracias, en verdad estoy aprendiendo mucho con este curso y lo agradezco infinitamente
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gracias Profe!. Es el mejor, estoy aprendiendo mucho.