/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/ui/src/tooltip/root.tsx
26 строк
1 KB
Marco Ciampini
UI: Derive Base UI direction from WordPress i18n (#80399)
10 авг 2026, 18:44
Не верифицирован
10 авг 2026, 18:44
4762fb7
Код
Авторство
О чём код?
import { Tooltip as _Tooltip } from '@base-ui/react/tooltip'; import type { RootProps } from './types'; import { DirectionProvider } from '../utils/direction-provider'; /** * `Tooltip` is used to visually show the label of an icon button, or other such * interactive controls that don't have a visual text label. * * Tooltip popups are visual-only and not exposed to assistive technologies. * The trigger's accessible name (e.g. `aria-label`) is the source of truth * for screen reader users. Tooltips are not available on touch devices, * and thus should not be used for infotips, descriptions, or dynamic status * messages. * * @see {@link https://wordpress.github.io/gutenberg/?path=/docs/design-system-components-tooltip-usage-guidelines--docs Usage Guidelines} * @see {@link https://wordpress.github.io/gutenberg/?path=/docs/design-system-components-iconbutton--docs IconButton} */ function Root( props: RootProps ) { return ( <DirectionProvider> <_Tooltip.Root { ...props } /> </DirectionProvider> ); } export { Root };