diff options
author | Dan Finlay <dan@danfinlay.com> | 2018-03-07 06:59:09 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2018-03-07 06:59:09 +0800 |
commit | 423f084cb47d84e2e9063a6567454f83592f424b (patch) | |
tree | bc2f3040cd76765fa27bbfc0e3913cf5e466c063 /ui/app/components/tooltip-v2.js | |
parent | 8ba64c657ff801425c06db166e2c9a06289047de (diff) | |
parent | 303801d2768a264a27a51916e5debf778739ee0c (diff) | |
download | tangerine-wallet-browser-423f084cb47d84e2e9063a6567454f83592f424b.tar.gz tangerine-wallet-browser-423f084cb47d84e2e9063a6567454f83592f424b.tar.zst tangerine-wallet-browser-423f084cb47d84e2e9063a6567454f83592f424b.zip |
Merge branch 'master' into i3076-UseStorageLocalInstead
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), + + ]) +} |