position
- optional (right by default) - String - top|bottom|left|right
styles
- optional prop to override default styles of tooltip -
{
content: {
/* css for content section of the tooltip */
}
tooltip: {
/* css for container of content in the tooltip */
}
}
content
- required - String|DOM element|React component
const redTooltip = {
tooltip: {
background: '#E53935',
},
content: {
background: '#E53935',
},
};
<Tooltip
position="top"
styles={redTooltip}
content="I'm a red tooltip below the content.">
<img src="" alt="" />
</Tooltip>