/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/components/src/composite/hover.tsx
19 строк
837 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import * as Ariakit from '@ariakit/react'; import { forwardRef } from '@wordpress/element'; import type { WordPressComponentProps } from '../context'; import { useCompositeContext } from './context'; import type { CompositeHoverProps } from './types'; export const CompositeHover = forwardRef< HTMLDivElement, WordPressComponentProps< CompositeHoverProps, 'div', false > >( function CompositeHover( props, ref ) { const context = useCompositeContext(); // @ts-expect-error The store prop is undocumented and only used by the // legacy compat layer. The `store` prop is documented, but its type is // obfuscated to discourage its use outside of the component's internals. const store = ( props.store ?? context.store ) as Ariakit.CompositeStore; return <Ariakit.CompositeHover store={ store } { ...props } ref={ ref } />; } );