import classNames from 'classnames'; import React, { ElementType, FC, HTMLAttributes } from 'react'; export interface StepperHeaderProps extends HTMLAttributes { /** Utilizzarlo in caso di utilizzo di componenti personalizzati */ tag?: ElementType; /** Classi aggiuntive da usare per il componente StepperHeader */ className?: string; testId?: string; } export const StepperHeader: FC = ({ tag = 'div', testId, className, children, ...attributes }) => { const Tag = tag; const wrapperClass = classNames('steppers-header', className); // @ts-expect-error not recognize children's props const isMobile = children?.props?.variant === 'mobile'; return ( {isMobile ? {children} :
    {children}
}
); };