/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/block-library/src/text-columns/transforms.js
31 строка
591 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import { createBlock } from '@wordpress/blocks'; const transforms = { to: [ { type: 'block', blocks: [ 'core/columns' ], transform: ( { className, columns, content, width } ) => createBlock( 'core/columns', { align: 'wide' === width || 'full' === width ? width : undefined, className, columns, }, content.map( ( { children } ) => createBlock( 'core/column', {}, [ createBlock( 'core/paragraph', { content: children, } ), ] ) ) ), }, ], }; export default transforms;