UNPKG

@vertisanpro/flowbite-react

Version:

Non-Official React components built for Flowbite and Tailwind CSS

11 lines (10 loc) 372 B
'use client'; 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; }