import * as React from "react"; import { ClassHelpers } from "../../"; import { TStepperDirection } from "../../hooks/useStepper"; export interface IStepperProps { /** (TStepperDirection) Should the stepper be vertical or horizontal */ direction: TStepperDirection; } const StepperContent = React.createContext(undefined); export const Stepper: React.FunctionComponent = ({ children, direction, }) => { return (
{children}
); }; export interface IStepProps { /** (JSX.Element) Custom Spacer Item */ customSpacer?: JSX.Element; /** (boolean) Should there be a spacer */ spacer?: boolean; } export const Step: React.FunctionComponent = ({ children, customSpacer, spacer, }) => { const ctx = React.useContext(StepperContent); return ( <> {children} {spacer ? ( customSpacer ? ( customSpacer ) : ( ) ) : null} ); }; interface IStepperSpacerProps { direction: TStepperDirection; } export const DefaultSpacer: React.FunctionComponent = ({ direction, }) => { return ( ); };