@transkripid/flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS - Transkrip.id fork
1 lines • 962 B
Source Map (JSON)
{"version":3,"file":"NavbarContext.mjs","sources":["../../../src/components/Navbar/NavbarContext.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext } from 'react';\nimport type { FlowbiteNavbarTheme } from './Navbar';\n\ntype NavbarContext = {\n theme: FlowbiteNavbarTheme;\n isOpen?: boolean;\n setIsOpen: (isOpen: boolean) => void;\n};\n\nexport const NavbarContext = createContext<NavbarContext | undefined>(undefined);\n\nexport function useNavbarContext(): NavbarContext {\n const context = useContext(NavbarContext);\n\n if (!context) {\n throw new Error('useNavBarContext should be used within the NavbarContext provider!');\n }\n\n return context;\n}\n"],"names":["NavbarContext","createContext","undefined","useNavbarContext","context","useContext","Error"],"mappings":";AAWaA,MAAAA,IAAgBC,EAAyCC,MAAS;AAExE,SAAAC,IAAA;AACLC,QAAAA,IAAgBC,EAAAL,CAAwB;AAAE,MAAA,CAErCI;AAAOE,UAAAA,IAAAA,MACM,oEAAoE;AAG/EF,SAAAA;AAAO;"}