maputnik/src/components/Button.jsx

31 lines
684 B
React
Raw Normal View History

2016-12-22 11:27:53 +01:00
import React from 'react'
import colors from '../config/colors'
import { margins, fontSizes } from '../config/scales'
class Button extends React.Component {
static propTypes = {
2016-12-22 16:35:31 +01:00
onClick: React.PropTypes.func,
2016-12-22 11:27:53 +01:00
style: React.PropTypes.object,
}
render() {
return <a
onClick={this.props.onClick}
style={{
cursor: 'pointer',
backgroundColor: colors.midgray,
color: colors.lowgray,
2016-12-28 16:48:49 +01:00
fontSize: fontSizes[5],
2016-12-22 11:27:53 +01:00
padding: margins[1],
userSelect: 'none',
borderRadius: 2,
2017-01-09 21:07:51 +01:00
boxSizing: 'border-box',
2016-12-22 11:27:53 +01:00
...this.props.style,
}}>
{this.props.children}
</a>
}
}
export default Button