aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/alert
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/alert')
-rw-r--r--ui/app/components/alert/index.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/ui/app/components/alert/index.js b/ui/app/components/alert/index.js
new file mode 100644
index 000000000..fc39d41e2
--- /dev/null
+++ b/ui/app/components/alert/index.js
@@ -0,0 +1,22 @@
+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
+