UNPKG

@vertisanpro/flowbite-react

Version:

Non-Official React components built for Flowbite and Tailwind CSS

11 lines (10 loc) 357 B
'use client'; import { createContext, useContext } from 'react'; export const DropdownContext = createContext(undefined); export function useDropdownContext() { const context = useContext(DropdownContext); if (!context) { throw new Error('useDropdownContext should be used within the DropdownContext provider!'); } return context; }