/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/block-library/src/text-columns/save.js
21 строка
538 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
import { RichText, useBlockProps } from '@wordpress/block-editor'; export default function save( { attributes } ) { const { width, content, columns } = attributes; return ( <div { ...useBlockProps.save( { className: `align${ width } columns-${ columns }`, } ) } > { Array.from( { length: columns } ).map( ( _, index ) => ( <div className="wp-block-column" key={ `column-${ index }` }> <RichText.Content tagName="p" value={ content?.[ index ]?.children } /> </div> ) ) } </div> ); }