aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/tooltip.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/tooltip.js')
-rw-r--r--ui/app/components/tooltip.js22
1 files changed, 22 insertions, 0 deletions
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)
+
+}