mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-05 23:23:04 +01:00
27 lines
688 B
JavaScript
27 lines
688 B
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import classnames from 'classnames'
|
|
|
|
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,
|
|
children: PropTypes.node
|
|
}
|
|
|
|
render() {
|
|
return <button
|
|
onClick={this.props.onClick}
|
|
aria-label={this.props["aria-label"]}
|
|
className={classnames("maputnik-button", this.props.className)}
|
|
data-wd-key={this.props["data-wd-key"]}
|
|
style={this.props.style}>
|
|
{this.props.children}
|
|
</button>
|
|
}
|
|
}
|
|
|
|
export default Button
|