/
githubmirror
/
wp-calypso
Обзор
Документация
Войти
/
githubmirror
/
wp-calypso
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
client/components/layout/column.jsx
20 строк
480 B
Paulo Marcos Trentin
Client: split forward-compatible React 19 type updates (#111699)
16 июн 2026, 17:06
Не верифицирован
16 июн 2026, 17:06
70747a5
Код
Авторство
О чём код?
import clsx from 'clsx'; import PropTypes from 'prop-types'; import './style.scss'; export default function Column( { children, type, className = undefined } ) { const columnClasses = clsx( 'layout__column', type === 'main' && 'layout__column--main', type === 'sidebar' && 'layout__column--sidebar', className ); return <div className={ columnClasses }>{ children }</div>; } Column.propTypes = { className: PropTypes.string, type: PropTypes.string.isRequired, };