Files
editor/src/components/fields/DocLabel.jsx
2017-11-06 15:32:04 +00:00

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>
}
}