function Button({children, ...rest}) {
return (
<button className="great-button">
{children}
</button>
);
}
function Button({children, ...rest}) {
return (
<button {...rest} className="great-button">
{children}
</button>
);
}
button
не теряя уже существующий .great-button
? const Button = ({ children, className = '', ...rest }) => (
<button {...rest} className={`button ${className}`}>
{children}
</button>
);
const Button = ({ children, className, ...rest }) => (
<button {...rest} className={classnames('great-button', className)}>
{children}
</button>
);