/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/block-library/src/buttons/edit.js
24 строки
629 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import clsx from 'clsx'; import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor'; const DEFAULT_BLOCK = { name: 'core/button', }; function ButtonsEdit( { attributes, className } ) { const { fontSize, layout, style } = attributes; const blockProps = useBlockProps( { className: clsx( className, { 'has-custom-font-size': fontSize || style?.typography?.fontSize, } ), } ); const innerBlocksProps = useInnerBlocksProps( blockProps, { defaultBlock: DEFAULT_BLOCK, orientation: layout?.orientation ?? 'horizontal', } ); return <div { ...innerBlocksProps } />; } export default ButtonsEdit;