Package Exports
- react-tooltip
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-tooltip) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-tooltip
React tooltip component, inspired by tooltipsy (a jquery plugin I've used)
Installation
npm install react-tooltip --save
Usage
1 . Require react-tooltip after installation
var ReactTooltip = require("react-tooltip")
2 . Add data-placeholder = "your placeholder" to your element
<p data-placeholder="hello world">Tooltip</p>
3 . Including react-tooltip component
<ReactTooltip />
Example
'use strict';
var React = require("react");
var ReactTooltip = require("../index");
var Index = React.createClass({
render: function() {
return (
<section className="tooltip-example">
<p data-placeholder="foo">hover on me</p>
<p data-placeholder="This is another hover test" data-place="bottom">Tooltip from bottom</p>
<ReactTooltip />
</section>
)
}
});
React.render(<Index />,document.body)
License
MIT