1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-24 04:13:27 +02:00
metamask-extension/ui/app/components/alert/index.js

23 lines
501 B
JavaScript
Raw Normal View History

2018-07-19 08:31:02 +02:00
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