mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-05 03:43:12 +01:00
29 lines
651 B
JavaScript
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
|