jsketcher/modules/ui/components/controls/Button.tsx
2020-05-21 17:23:07 -07:00

21 lines
362 B
TypeScript

import React from 'react';
import cx from 'classnames';
export default function Button({type, onClick, className, ...props}: {
type?: string,
onClick: () => void,
className? : string,
children?: any,
} & JSX.IntrinsicAttributes) {
type = type || 'neutral';
return <button onClick={onClick} className={cx(type, className)} {...props} />
}