import React from 'react'
import { Link } from 'react-router-dom'

import cn from 'utils/cn'

import './button.css'

const Button = ({
  children,
  to,
  href,
  small,
  ghost,
  disabled,
}) => {
  const Tag = to ? Link
    : href ? 'a'
    : 'button'

  return (
    <Tag
      to={to}
      href={href}
      disabled={disabled}
      className={cn(
        'button',
        small && 'button--small',
        ghost && 'button--ghost',
      )}
      >
      {children}
    </Tag>
  )
}

export default Button

@@ -184,16 +184,27 @@
 sabled,%0A
+  onClick,%0A
 %7D) =%3E %7B%0A
@@ -454,16 +454,40 @@
      )%7D%0A
+      onClick=%7BonClick%7D%0A
       %3E%0A

add onClick prop