You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/tooltip/README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,13 +57,14 @@ import Tooltip from '@leafygreen-ui/tooltip';
57
57
|`className`|`string`| Applies a className to Tooltip container ||
58
58
|`children`|`node`| Content that will be rendered inside of `<Tooltip />`||
59
59
|`enabled`|`boolean`| Enables Tooltip to trigger based on the event specified by `triggerEvent`. |`true`|
60
-
|`onClose`|`function`| Callback that is called when the tooltip is closed internally. E.g. on ESC press, on backdrop click, on blur.. |`() => {}`|
60
+
|`onClose`|`function`| Callback that is called when the tooltip is closed internally. E.g. on ESC press, on backdrop click, on blur.. ||
61
61
|`renderMode`|`'inline'`\|`'portal'`\|`'top-layer'`| Options to render the popover element <br> \*[deprecated]`'inline'` will render the popover element inline in the DOM where it's written <br> \*[deprecated]`'portal'` will render the popover element in a new div appended to the body. Alternatively, can be portaled into a provided `portalContainer` <br> \*`'top-layer'` will render the popover element in the top layer |`'top-layer'`|
62
62
|`portalContainer`|`HTMLElement`\|`null`| Sets the container used for the popover's portal. NOTE: If using a `scrollContainer` make sure that the `portalContainer` is contained within the `scrollContainer`. E.g, passing the same refrence to `scrollContainer` and `portalContainer`. ||
63
63
|`scrollContainer`|`HTMLElement`\|`null`| If the popover portal has a scrollable ancestor other than the window, this prop allows passing a reference to that lement to allow the portal to position properly. ||
64
64
|`portalClassName`|`string`| Passes the given className to the popover's portal container if the default portal container is being used. ||
65
65
|`popoverZIndex`|`number`| Sets the z-index CSS property for the popover. ||
66
-
|`baseFontSize`|`13`\|`16`| font-size applied to typography element | default to value set by LeafyGreen Provider |
66
+
|`baseFontSize`|`13`\|`16`| Allows consuming applications to override font-size as set by the LeafyGreen Provider. This prop is only considered when `variant` is `'default'`. | default to value set by LeafyGreen Provider |
67
+
|`variant`|`'default'`\|`'compact'`| Variant of the tooltip to be rendered. |`'default'`|
67
68
| ... | native `div` attributes | Any other props will be spread on the root `div` element ||
0 commit comments