UNPKG

@payfit/unity-components

Version:

17 lines (16 loc) 933 B
import { PropsWithChildren } from 'react'; /** * Global Timeline configuration context * Provides orientation and type to all nested Timeline components (TimelineStep, TimelineMarker, etc.) * * Note: This context is separate from TimelineStepContentContext to maintain single responsibility: * - TimelineContext: Global configuration (orientation, type) - used by all components * - TimelineStepContentContext: Content-specific data (statusSlot) - used only within TimelineStepContent */ export interface TimelineContextValue { orientation: 'vertical' | 'horizontal'; type: 'default' | 'numbered'; } export declare const TimelineContext: import('react').Context<TimelineContextValue | null>; export declare function TimelineProvider({ children, orientation, type, }: PropsWithChildren<TimelineContextValue>): import("react/jsx-runtime").JSX.Element; export declare function useTimelineContext(): TimelineContextValue;