2016-12-22 11:27:53 +01:00
|
|
|
import React from 'react'
|
2017-11-06 16:32:04 +01:00
|
|
|
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 = {
|
2018-01-05 18:45:55 +01:00
|
|
|
"data-wd-key": PropTypes.string,
|
2018-05-19 09:23:41 +02:00
|
|
|
"aria-label": PropTypes.string,
|
2017-11-06 16:32:04 +01:00
|
|
|
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() {
|
2018-05-11 11:55:32 +02:00
|
|
|
return <button
|
2016-12-22 11:27:53 +01:00
|
|
|
onClick={this.props.onClick}
|
2018-05-19 09:23:41 +02:00
|
|
|
aria-label={this.props["aria-label"]}
|
2017-01-11 09:35:48 +01:00
|
|
|
className={classnames("maputnik-button", this.props.className)}
|
2018-01-05 18:45:55 +01:00
|
|
|
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}
|
2018-05-11 11:55:32 +02:00
|
|
|
</button>
|
2016-12-22 11:27:53 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Button
|