Package Exports
- @react-md/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-md/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-md/tooltip
Create accessible tooltips to add additional descriptions to buttons, links, or any other element. The tooltips will automatically attempt to position themselves within the viewport and adjust as needed.
Installation
npm install --save @react-md/tooltipIt is also recommended to install the following packages as they work hand-in-hand with this package:
npm install --save @react-md/theme \
@react-md/buttonDocumentation
You should check out the full documentation for live examples and more customization information, but an example usage is shown below.
Usage
import React, { Fragment } from "react";
import { render } from "react-dom";
import { Button } from "@react-md/button";
import { Tooltipped } from "@react-md/tooltip";
const App = () => (
<Tooltipped id="button-id" tooltip="I am a tooltip">
<Button>Button Text</Button>
</Tooltipped>
);
render(<App />, document.getElementById("root"));