1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
2018-07-19 02:31:02 -04:00

23 lines
501 B
JavaScript

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