UNPKG

mt-flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS

10 lines (9 loc) 358 B
import { createContext, useContext } from 'react'; export const SidebarItemContext = createContext(undefined); export function useSidebarItemContext() { const context = useContext(SidebarItemContext); if (!context) { throw new Error('useSidebarItemContext should be used within the SidebarItemContext provider!'); } return context; }