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 { Dialog, Transition } from '@headlessui/react'; | |
| import { useLocation, useNavigate, useSearchParams } from 'react-router-dom'; | |
| export default function AddTaskModal() { | |
| const location = useLocation() | |
| const navigate = useNavigate() | |
| /* Get the queries from the URL */ | |
| const queryParams = new URLSearchParams(location.search) |
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
| <div className="flex shrink-0 gap-x-6"> | |
| <Menu as="div" className="relative flex-none"> | |
| <Menu.Button className="-m-2.5 block p-2.5 text-gray-500 hover:text-gray-900"> | |
| <span className="sr-only">opciones</span> | |
| <EllipsisVerticalIcon className="h-9 w-9" aria-hidden="true" /> | |
| </Menu.Button> | |
| <Transition as={Fragment} enter="transition ease-out duration-100" enterFrom="transform opacity-0 scale-95" | |
| enterTo="transform opacity-100 scale-100" leave="transition ease-in duration-75" | |
| leaveFrom="transform opacity-100 scale-100" leaveTo="transform opacity-0 scale-95"> | |
| <Menu.Items |
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
| /* Component Created By Camilo Velasquez botero */ | |
| /* | |
| Swipe an item | |
| 1- enclose the div in this component and passing it as children | |
| 2- Give the properties "onLeadingSwipeFunction" to the Left side for the function and "onTrailingSwipeFunction" for the Rigth side | |
| 3- Give the content to show to the user in "leadingActionContent" to left and "trailingActionContent" to right | |
| */ | |
| import { useState, useRef, useCallback } from "react" |
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
| export function formatCurrency(amount:number) { | |
| return new Intl.NumberFormat('en-US', { | |
| style: 'currency', | |
| currency: 'USD' | |
| }).format(amount) | |
| } |
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 { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/outline' | |
| import { XMarkIcon } from '@heroicons/react/20/solid' | |
| import { Transition } from '@headlessui/react' | |
| import { useAppStore } from '../stores/useAppStore' | |
| export default function Notification() { | |
| const notification = useAppStore((state) => state.notification) | |
| const hideNotification = useAppStore((state) => state.hideNotification) |
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 { Dialog, Transition } from '@headlessui/react'; | |
| import { Fragment, useState } from 'react'; | |
| export default function Modal() { | |
| const [modal, useModal] = useState(true) | |
| return ( | |
| <> | |
| <Transition appear show={modal} as={Fragment}> | |
| <Dialog as="div" className="relative z-10" onClose={() => { }}> | |
| <Transition.Child |