/**
* External dependencies
*/
import classnames from 'classnames';
/**
* Internal dependencies
*/
import './style.scss';
import Title from '../title';
interface StepHeadingProps {
title: string;
stepHeadingContent?: JSX.Element;
}
const StepHeading = ( { title, stepHeadingContent }: StepHeadingProps ) => (
{ title }
{ !! stepHeadingContent && (
{ stepHeadingContent }
) }
);
export interface FormStepProps {
id?: string;
className?: string;
title?: string;
legend?: string;
description?: string;
children?: React.ReactNode;
disabled?: boolean;
showStepNumber?: boolean;
stepHeadingContent?: () => JSX.Element | undefined;
}
const FormStep = ( {
id,
className,
title,
legend,
description,
children,
disabled = false,
showStepNumber = true,
stepHeadingContent = () => undefined,
}: FormStepProps ): JSX.Element => {
// If the form step doesn't have a legend or title, render a instead
// of a