import React, { FC } from "react"; type StepProps = { children: any step: number } export const Step: FC = ({ children }) => (children); type Props = { children: any; currentStep: number; className?: string; }; export const SteppedForm: FC = ({ children, currentStep, className = '', }) => { return (
{children?.map((x: any) => { const visible = x.props.step === currentStep; return (
{x}
); })}
); };