Tooltip
$ npm install @jouwomgeving/ui-tooltip
Usage
import Tooltip from '@jouwomgeving/ui-tooltip';
function Component() {
return (
<Tooltip
content="Content of the tooltip"
orientation="top-center"
>
<span>Hello world!</span>
</Tooltip>
);
}
export default Component;
About
A component that ads a tooltip to the child element.
Properties
Prop | Values | Default | Required |
---|---|---|---|
children | ReactElement | true | |
content | string | false | |
orientation | string | top-center | false |