/** * A row's Style fields — background, bottom border, padding and margin. * Shared by the row settings modal's Style tab and the header's Design tab. */ import { __ } from '@wordpress/i18n'; import ColorField from '../../controls/color-field'; import BoxField from '../../controls/box-field'; import BorderField from '../../controls/border-field'; import type { RowDesign, BoxValue } from './canvas-model'; interface RowDesignFieldsProps { design: RowDesign; onDesign: ( patch: Partial< RowDesign > ) => void; } export default function RowDesignFields( { design, onDesign, }: RowDesignFieldsProps ) { return ( <> onDesign( { background } ) } /> onDesign( { border_bottom_size: size } ) } onColorChange={ ( color ) => onDesign( { border_bottom_color: color } ) } /> onDesign( { padding } ) } /> onDesign( { margin } ) } /> ); }