import React from 'react';
import Button, { Props as ButtonProps } from './Button';

const ErrorButton = ({ children, ...rest }: ButtonProps) => {
    return (
        <Button className="pm-button--error" {...rest}>
            {children}
        </Button>
    );
};

export default ErrorButton;

import React from 'react';
import Button, { Props as ButtonProps } from './Button';
import { classnames } from '../../helpers/component';

const ErrorButton = ({ children, className, ...rest }: ButtonProps) => {
    return (
        <Button className={classnames(['pm-button--error', className])} {...rest}>
            {children}
        </Button>
    );
};

export default ErrorButton;

Fix error button className merging
Fix error button className merging
