Preferences page rehaul: use React components, UI improvements

This commit is contained in:
Feross Aboukhadijeh
2016-08-22 00:27:05 -07:00
parent aa150b76a5
commit 173d8444d7
14 changed files with 458 additions and 458 deletions

View File

@@ -0,0 +1,40 @@
const c = require('classnames')
const React = require('react')
class Button extends React.Component {
static get propTypes () {
return {
className: React.PropTypes.string,
onClick: React.PropTypes.func,
theme: React.PropTypes.oneOf(['light', 'dark']),
type: React.PropTypes.oneOf(['default', 'flat', 'raised'])
}
}
static get defaultProps () {
return {
theme: 'light',
type: 'default'
}
}
render () {
const { theme, type, className, ...other } = this.props
return (
<button
{...other}
className={c(
'Button',
theme,
type,
className
)}
onClick={this.props.onClick}
>
{this.props.children}
</button>
)
}
}
module.exports = Button