REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 2.58 KB
Close
//proc/thread-self/root/home/byroehnu/easetack.com/resources/js/Components/Dropdown.jsx
Text
Base64
import { useState, createContext, useContext, Fragment } from "react" import { Link } from "@inertiajs/react" import { Transition } from "@headlessui/react" const DropDownContext = createContext() const Dropdown = ({ children }) => { const [open, setOpen] = useState(false) const toggleOpen = () => { setOpen((previousState) => !previousState) } return ( <DropDownContext.Provider value={{ open, setOpen, toggleOpen }}> <div className="relative">{children}</div> </DropDownContext.Provider> ) } const Trigger = ({ children }) => { const { open, setOpen, toggleOpen } = useContext(DropDownContext) return ( <> <div onClick={toggleOpen}>{children}</div> {open && <div className="fixed inset-0 z-40" onClick={() => setOpen(false)}></div>} </> ) } const Content = ({ align = "right", width = "48", contentClasses = "py-1 bg-white", children }) => { const { open, setOpen } = useContext(DropDownContext) let alignmentClasses = "origin-top" if (align === "left") { alignmentClasses = "origin-top-left left-0" } else if (align === "right") { alignmentClasses = "origin-top-right right-0" } let widthClasses = "" if (width === "48") { widthClasses = "w-48" } return ( <> <Transition as={Fragment} show={open} enter="transition ease-out duration-200" 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" > <div className={`absolute z-50 mt-2 rounded-md shadow-lg ${alignmentClasses} ${widthClasses}`} onClick={() => setOpen(false)}> <div className={`rounded-md ring-1 ring-black ring-opacity-5 ` + contentClasses}>{children}</div> </div> </Transition> </> ) } const DropdownLink = ({ className = "", children, ...props }) => { return ( <Link {...props} className={ "block w-full px-4 py-2 text-left text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out " + className } > {children} </Link> ) } Dropdown.Trigger = Trigger Dropdown.Content = Content Dropdown.Link = DropdownLink export default Dropdown
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 14
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Amount.jsx
1.22 KB
lrw-rw-rw-
2025-04-09 10:29:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ApplicationLogo.jsx
3.06 KB
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Checkbox.jsx
214 B
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DangerButton.jsx
651 B
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Dropdown.jsx
2.58 KB
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
InputError.jsx
220 B
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
InputLabel.jsx
255 B
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Modal.jsx
2.07 KB
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NavigationLink.jsx
418 B
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NavLink.jsx
704 B
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PrimaryButton.jsx
676 B
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ResponsiveNavLink.jsx
766 B
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SecondaryButton.jsx
708 B
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TextInput.jsx
555 B
lrw-rw-rw-
2025-04-08 04:12:57
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).