0.6.3 • Published 3 years ago
@bdt-component-library/tooltip v0.6.3
Tooltip Component
About
This is a component published as its own package from our component library monorepo: https://github.com/BenefitsDataTrust/ui-components. Setup instructions, as well as higher-level goals and concerns can be found from the main project README.
Description
Handles display of tooltips according to style guide conventions.
API
prop | type | required | default | explanation |
---|---|---|---|---|
display | enum("default", "light") | no | "default" | Changes the foreground/background color mode |
children | React node | yes | n/a | The primary component to receive tooltip effects |
hoverContent | React element | yes | n/a | The tooltip element or text |
tooltipClass | string | no | n/a | Adds an optional classname to the tooltip element |
className | string | no | n/a | Adds an optional classname to the main component |
staticPosition | enum("topRight", "topLeft", "bottomRight", "bottomLeft") | no | n/a | Determines the position of the displayed tooltip text, if using static positioning |
description | string | no | n/a | Sets optional aria, title, and id attrs |