mirror of
https://github.com/maputnik/editor.git
synced 2025-12-26 16:10:01 +00:00
24 lines
552 B
JavaScript
24 lines
552 B
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
|
|
export default class DocLabel extends React.Component {
|
|
static propTypes = {
|
|
label: PropTypes.oneOfType([
|
|
PropTypes.object,
|
|
PropTypes.string
|
|
]).isRequired,
|
|
doc: PropTypes.string.isRequired,
|
|
}
|
|
|
|
render() {
|
|
return <label className="maputnik-doc-wrapper">
|
|
<div className="maputnik-doc-target">
|
|
<span>{this.props.label}</span>
|
|
<div className="maputnik-doc-popup">
|
|
{this.props.doc}
|
|
</div>
|
|
</div >
|
|
</label>
|
|
}
|
|
}
|