@payfit/unity-components
Version:
19 lines (18 loc) • 1.11 kB
TypeScript
import { PropsWithChildren, ReactNode } from 'react';
/**
* TimelineStepContent-specific context
* Provides content data (statusSlot) to nested components like TimelineStepHeader
*
* Note: This context is separate from TimelineContext to maintain single responsibility:
* - TimelineContext: Global configuration (orientation, type) - used by all components
* - TimelineStepContentContext: Content-specific data (statusSlot) - scoped to TimelineStepContent only
*
* This separation ensures that content-level data doesn't pollute the global Timeline context
* and allows TimelineStepContent to manage its own internal state independently.
*/
export interface TimelineStepContentContextValue {
statusSlot?: ReactNode;
}
export declare const TimelineStepContentContext: import('react').Context<TimelineStepContentContextValue | null>;
export declare function TimelineStepContentProvider({ children, statusSlot, }: PropsWithChildren<TimelineStepContentContextValue>): import("react/jsx-runtime").JSX.Element;
export declare function useTimelineStepContentContext(): TimelineStepContentContextValue;