@trellixio/roaster-coffee
Version:
Beans' product component library
8 lines (7 loc) • 531 B
JavaScript
import * as React from 'react';
import { classNames } from '@/utils';
export const Button = React.forwardRef((props, ref) => {
const { children, submit, variant = 'primary', color, disabled, className, style, onClick, isIconButton } = props;
return (React.createElement("button", { ref: ref, style: style, onClick: onClick, disabled: disabled, type: submit ? 'submit' : 'button', className: classNames('button', variant, color, { disabled, icon: isIconButton }, className) }, children));
});
Button.displayName = 'Button';