maputnik/src/components/Button.jsx

28 lines
688 B
React
Raw Normal View History

2016-12-22 11:27:53 +01:00
import React from 'react'
import PropTypes from 'prop-types'
2017-01-11 09:35:48 +01:00
import classnames from 'classnames'
2016-12-22 11:27:53 +01:00
class Button extends React.Component {
static propTypes = {
"data-wd-key": PropTypes.string,
"aria-label": PropTypes.string,
onClick: PropTypes.func,
style: PropTypes.object,
className: PropTypes.string,
2017-11-08 09:47:36 +01:00
children: PropTypes.node
2016-12-22 11:27:53 +01:00
}
render() {
return <button
2016-12-22 11:27:53 +01:00
onClick={this.props.onClick}
aria-label={this.props["aria-label"]}
2017-01-11 09:35:48 +01:00
className={classnames("maputnik-button", this.props.className)}
data-wd-key={this.props["data-wd-key"]}
2017-01-10 21:28:30 +01:00
style={this.props.style}>
2016-12-22 11:27:53 +01:00
{this.props.children}
</button>
2016-12-22 11:27:53 +01:00
}
}
export default Button