Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve : showTooltip documentation #66673

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/components/src/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ If provided with `showTooltip`, appends the Shortcut label to the tooltip conten

If provided, renders a [Tooltip](/packages/components/src/tooltip/README.md) component for the button.

##### Usage Guidelines:

1. Tooltips must be used only to visually expose the label of controls that don't show visible text.
2. Tooltips usage must take into account the showIconLabels preference: when enabled and the control shows visible text, the tooltip must be disabled.

- Required: No

#### `size`: `'default'` | `'compact'` | `'small'`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ The value of the `ToggleGroupControlOptionBase`.

Whether to show a tooltip when hovering over the option. The tooltip will only show if a label for it is provided using the `aria-label` prop.

#### Usage Guidelines:

1. Tooltips must be used only to visually expose the label of controls that don't show visible text.
2. Tooltips usage must take into account the showIconLabels preference: when enabled and the control shows visible text, the tooltip must be disabled.

- Required: No
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,9 @@ The value of the `ToggleGroupControlOption`.

Whether to show a tooltip when hovering over the option. The tooltip will attempt to use the `aria-label` prop text first, then the `label` prop text if no `aria-label` prop is found.

#### Usage Guidelines:

1. Tooltips must be used only to visually expose the label of controls that don't show visible text.
2. Tooltips usage must take into account the showIconLabels preference: when enabled and the control shows visible text, the tooltip must be disabled.

- Required: No
Loading