import React from "react" interface StepProps { title: string children: React.ReactNode } const Step: React.FC = ({ title, children }) => (

{title}

{children}
) interface StepsProps { children: React.ReactNode } const Steps: React.FC & { Step: typeof Step } = ({ children }) => (
{React.Children.map(children, (child, index) => (
{index + 1}
{child}
))}
) Steps.Step = Step export { Steps }