2.0.1 • Published 7 years ago

fc-react-tooltip v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

fc-react-tooltip

A tooltip component made in react. The tooltip can be styled and figures out on it's own where to place itself based on the available screen space relative to the trigger element.

Install

npm install fc-react-tooltip

Demo

Demo

Try the online example

Usage

var ReactDOM = require('react-dom');
var React = require('react');
var Tooltip = require('fc-react-tooltip');

var Example = React.createClass({

  render: function() {
    return (
      <div>
        <button id="foo">Show Tooltip</button>
        
        <Tooltip selector="#foo" overlayStyles={{}} tooltipStyles={{color: 'red'}}>
            Hello World!
        </Tooltip>
      </div>
    );
  }
});

ReactDOM.render(<Example />, document.getElementById('container'));

Pass a unique selector for the element that will trigger the tooltip on click to the selector property.

You can set the inline styles for the tooltip by passing your styles in the tooltipStyles property.

You can also style the tooltip's overlay that covers the screen to catch the click that removes the tooltip by passing styles to overlayStyles.

If you want to approach the styling using css use .fc-overlay and .fc-tooltip to do your styling.

2.0.1

7 years ago

2.0.0

7 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago