Simple Tooltip component
npm install @didww/react-tooltip
or yarn add @didww/react-tooltip
import Tooltip from '@didww/react-tooltip';
const MyComponent = () => {
return (
<Tooltip title={ <span>Tooltip Title here</span> }>
<p>Tooltip Content here</p>
</Tooltip>
);
};
Parameter | Description | Type | Default |
---|---|---|---|
title | Element, which triggers tooltip appearance | ReactNode |
- (required) |
children | Content of tooltip | ReactNode | ReactNode[] |
null |
placement | Position of displayed tooltip content | top-left | top-right | bottom-left |bottom-right |
top-right |
maxWidth | Maximum width in pixels of tooltip content | number |
198 |
className | className of tooltip wrapper component | string |
'' |