aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-06-30 07:21:38 +0800
committerDan Finlay <dan@danfinlay.com>2016-06-30 07:21:38 +0800
commit2880f8631c4de09860b2be01c90b4b30d08c8415 (patch)
tree29833bc540d8f30378e82deaae842a21aecb2ab6 /ui/app/components
parent2b5c42d27f49a642a2441ad77f3cfba5ada071cb (diff)
downloadtangerine-wallet-browser-2880f8631c4de09860b2be01c90b4b30d08c8415.tar.gz
tangerine-wallet-browser-2880f8631c4de09860b2be01c90b4b30d08c8415.tar.zst
tangerine-wallet-browser-2880f8631c4de09860b2be01c90b4b30d08c8415.zip
Unify tooltip styles
Made a local tooltip component for replicating our tooltip styles wherever we use tooltips. Applied that tooltip to other items that had tooltips.
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/copyButton.js3
-rw-r--r--ui/app/components/tooltip.js22
2 files changed, 23 insertions, 2 deletions
diff --git a/ui/app/components/copyButton.js b/ui/app/components/copyButton.js
index 182d7a670..a01603585 100644
--- a/ui/app/components/copyButton.js
+++ b/ui/app/components/copyButton.js
@@ -3,7 +3,7 @@ const h = require('react-hyperscript')
const inherits = require('util').inherits
const copyToClipboard = require('copy-to-clipboard')
-const Tooltip = require('react-tooltip-component')
+const Tooltip = require('./tooltip')
module.exports = CopyButton
@@ -32,7 +32,6 @@ CopyButton.prototype.render = function () {
}, [
h(Tooltip, {
- position: 'top',
title: message,
}, [
h('i.fa.fa-clipboard.cursor-pointer.color-orange', {
diff --git a/ui/app/components/tooltip.js b/ui/app/components/tooltip.js
new file mode 100644
index 000000000..4eab8611e
--- /dev/null
+++ b/ui/app/components/tooltip.js
@@ -0,0 +1,22 @@
+const Component = require('react').Component
+const h = require('react-hyperscript')
+const inherits = require('util').inherits
+const ReactTooltip = require('react-tooltip-component')
+
+module.exports = Tooltip
+
+inherits(Tooltip, Component)
+function Tooltip () {
+ Component.call(this)
+}
+
+Tooltip.prototype.render = function () {
+ const props = this.props
+
+ return h(ReactTooltip, {
+ position: 'left',
+ title: props.title,
+ fixed: false,
+ }, props.children)
+
+}