UNPKG

@transkripid/flowbite-react

Version:

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

1 lines 1.04 kB
{"version":3,"file":"TimelineContentContext.mjs","sources":["../../../src/components/Timeline/TimelineContentContext.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext } from 'react';\nimport type { FlowbiteTimelineContentTheme } from './TimelineContent';\n\nexport type TimelineContentContext = {\n theme: FlowbiteTimelineContentTheme;\n};\n\nexport const TimelineContentContext = createContext<TimelineContentContext | undefined>(undefined);\n\nexport function useTimelineContentContext(): TimelineContentContext {\n const context = useContext(TimelineContentContext);\n\n if (!context) {\n throw new Error('useTimelineContentContext should be used within the TimelineContentContext provider!');\n }\n\n return context;\n}\n"],"names":["TimelineContentContext","createContext","undefined","useTimelineContentContext","context","useContext","Error"],"mappings":";AASaA,MAAAA,IAAyBC,EAAkDC,MAAS;AAE1F,SAAAC,IAAA;AACLC,QAAAA,IAAgBC,EAAAL,CAAiC;AAAE,MAAA,CAE9CI;AAAOE,UAAAA,IAAAA,MACM,sFAAsF;AAGjGF,SAAAA;AAAO;"}