UNPKG

@transkripid/flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS - Transkrip.id fork

1 lines 964 B
{"version":3,"file":"TimelineContext.mjs","sources":["../../../src/components/Timeline/TimelineContext.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext } from 'react';\nimport type { FlowbiteTimelineTheme } from './Timeline';\n\nexport type TimelineContext = {\n theme: FlowbiteTimelineTheme;\n horizontal?: boolean;\n};\n\nexport const TimelineContext = createContext<TimelineContext | undefined>(undefined);\n\nexport function useTimelineContext(): TimelineContext {\n const context = useContext(TimelineContext);\n\n if (!context) {\n throw new Error('useTimelineContext should be used within the TimelineContext provider!');\n }\n\n return context;\n}\n"],"names":["TimelineContext","createContext","undefined","useTimelineContext","context","useContext","Error"],"mappings":";AAUaA,MAAAA,IAAkBC,EAA2CC,MAAS;AAE5E,SAAAC,IAAA;AACLC,QAAAA,IAAgBC,EAAAL,CAA0B;AAAE,MAAA,CAEvCI;AAAOE,UAAAA,IAAAA,MACM,wEAAwE;AAGnFF,SAAAA;AAAO;"}