You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
501 B
23 lines
501 B
6 years ago
|
const { Component } = require('react')
|
||
|
const PropTypes = require('prop-types')
|
||
|
const h = require('react-hyperscript')
|
||
|
|
||
|
class Alert extends Component {
|
||
|
|
||
|
render () {
|
||
|
const className = `.global-alert${this.props.visible ? '.visible' : '.hidden'}`
|
||
|
return (
|
||
|
h(`div${className}`, {},
|
||
|
h('a.msg', {}, this.props.msg)
|
||
|
)
|
||
|
)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Alert.propTypes = {
|
||
|
visible: PropTypes.bool.isRequired,
|
||
|
msg: PropTypes.string,
|
||
|
}
|
||
|
module.exports = Alert
|
||
|
|