import React, { ComponentPropsWithoutRef, ReactNode } from 'react'; import StepBase from './StepBase'; type CustomClickEvent = { href: string; number?: ReactNode; id: string; title: string; }; type Props = ComponentPropsWithoutRef & { href: string; number?: ReactNode; onClick?: (e: CustomClickEvent) => void; }; const StepLink = ({ id, href, number, title, className = 'past af-steps-list-step', onClick, ...otherProps }: Props) => ( { e.preventDefault(); onClick && onClick({ href, id, title, number }); }}> {!!number &&
{number}
}
{title}
); export default StepLink;