All files / button index.js

100% Statements 5/5
100% Branches 0/0
100% Functions 1/1
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32  1x 1x   330x                                                      
 
import React from 'react'
import classnames from 'classnames'
 
const Button = ({disabled, children, onClick, raised, type}) => (
  <button
    className={classnames('Button', {
      'Button--raised': raised
    })}
    disabled={disabled}
    onClick={onClick}
    type={type}
  >
    {children}
  </button>
)
 
Button.propTypes = {
  disabled: React.PropTypes.bool,
  onClick: React.PropTypes.func,
  raised: React.PropTypes.bool,
  type: React.PropTypes.oneOf(['submit', 'reset', 'button'])
}
 
Button.defaultProps = {
  disabled: false,
  raised: false,
  type: 'button'
}
 
export default Button