diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-02-01 10:24:20 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-02-01 10:24:20 +0800 |
commit | 4f1fe1da6295902e3e0fee633444f84f61f28449 (patch) | |
tree | a8e35564ec7963c70cd61868323c202bdc7131dd /ui/app/components/tooltip-v2.js | |
parent | 0c6fef3dec4f3ba70e8e86275ee9db4f2d58d129 (diff) | |
parent | 78bce55858916ba9d3189f76db440768e6ae95b1 (diff) | |
download | tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar.gz tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar.bz2 tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar.lz tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar.xz tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar.zst tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.zip |
Fix merge conflicts from uat-next
Diffstat (limited to 'ui/app/components/tooltip-v2.js')
-rw-r--r-- | ui/app/components/tooltip-v2.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ui/app/components/tooltip-v2.js b/ui/app/components/tooltip-v2.js new file mode 100644 index 000000000..133a0f16a --- /dev/null +++ b/ui/app/components/tooltip-v2.js @@ -0,0 +1,31 @@ +const Component = require('react').Component +const h = require('react-hyperscript') +const inherits = require('util').inherits +const ReactTippy = require('react-tippy').Tooltip + +module.exports = Tooltip + +inherits(Tooltip, Component) +function Tooltip () { + Component.call(this) +} + +Tooltip.prototype.render = function () { + const props = this.props + const { position, title, children, wrapperClassName } = props + + return h('div', { + className: wrapperClassName, + }, [ + + h(ReactTippy, { + title, + position: position || 'left', + trigger: 'mouseenter', + hideOnClick: false, + size: 'small', + arrow: true, + }, children), + + ]) +} |