maputnik/src/components/Button.jsx
2016-12-28 21:50:53 +01:00

29 lines
651 B
JavaScript

import React from 'react'
import colors from '../config/colors'
import { margins, fontSizes } from '../config/scales'
class Button extends React.Component {
static propTypes = {
onClick: React.PropTypes.func,
style: React.PropTypes.object,
}
render() {
return <a
onClick={this.props.onClick}
style={{
cursor: 'pointer',
backgroundColor: colors.midgray,
color: colors.lowgray,
fontSize: fontSizes[5],
padding: margins[1],
userSelect: 'none',
borderRadius: 2,
...this.props.style,
}}>
{this.props.children}
</a>
}
}
export default Button