diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-07-19 14:31:02 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-07-19 14:31:02 +0800 |
commit | 76981c2ad9b0f8f13fa61ba3b60c07203a81eb57 (patch) | |
tree | dfd375c3a0adb26a393d4b9dcf7456141a936423 /ui/app/components/alert | |
parent | 514148ffa1652b4e23ffe04fbe23bb0eadbdecb7 (diff) | |
download | tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.tar tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.tar.gz tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.tar.bz2 tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.tar.lz tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.tar.xz tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.tar.zst tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.zip |
added new global alert
Diffstat (limited to 'ui/app/components/alert')
-rw-r--r-- | ui/app/components/alert/index.js | 22 |
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 + |