From 2880f8631c4de09860b2be01c90b4b30d08c8415 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 29 Jun 2016 16:21:38 -0700 Subject: 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. --- ui/app/components/tooltip.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ui/app/components/tooltip.js (limited to 'ui/app/components/tooltip.js') 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) + +} -- cgit v1.2.3