UNPKG

@trellixio/roaster-coffee

Version:
8 lines (7 loc) 531 B
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';