mt-flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
10 lines (9 loc) • 363 B
JavaScript
import { createContext, useContext } from 'react';
export const AccordionPanelContext = createContext(undefined);
export function useAccordionContext() {
const context = useContext(AccordionPanelContext);
if (!context) {
throw new Error('useAccordionContext should be used within the AccordionPanelContext provider!');
}
return context;
}