<div id="app"></div>
const Button = ({
  f = 6,
  color = 'white',
  bg = 'purple',
  className,
  ...props
}) => {
  const cx = classNames(
    'bn dim br2 pv3 ph4',
    `f${f}`,
    color,
    `bg-${bg}`,
    className,
  );

  return <button className={cx} {...props} />;
};

const App = () => (
  <div className="vh-100 flex items-center justify-center">
    <Button className="mr3">Update</Button>
    <Button bg="moon-gray" color="dark-gray">Cancel</Button>
  </div>
);

ReactDOM.render(<App />, document.querySelector('#app'));
View Compiled

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/tachyons/4.9.1/tachyons.css

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/react/16.2.0/umd/react.development.js
  2. https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.2.0/umd/react-dom.development.js
  3. https://unpkg.com/classnames@2.2.5/index.js