/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/components/src/v-stack/component.tsx
42 строки
1023 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import type { ForwardedRef } from 'react'; import type { WordPressComponentProps } from '../context'; import { contextConnect } from '../context'; import { View } from '../view'; import { useVStack } from './hook'; import type { VStackProps } from './types'; function UnconnectedVStack( props: WordPressComponentProps< VStackProps, 'div' >, forwardedRef: ForwardedRef< any > ) { const vStackProps = useVStack( props ); return <View { ...vStackProps } ref={ forwardedRef } />; } /** * `VStack` (or Vertical Stack) is a layout component that arranges child * elements in a vertical line. * * `VStack` can render anything inside. * * ```jsx * import { * __experimentalText as Text, * __experimentalVStack as VStack, * } from `@wordpress/components`; * * function Example() { * return ( * <VStack> * <Text>Code</Text> * <Text>is</Text> * <Text>Poetry</Text> * </VStack> * ); * } * ``` */ export const VStack = contextConnect( UnconnectedVStack, 'VStack' ); export default VStack;