Skip to content

Commit

Permalink
Table: Display fixed width table cells option by default (#47536)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw authored Jan 31, 2023
1 parent 79dfbe7 commit 7381ea5
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions packages/block-library/src/table/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,30 +464,32 @@ function TableEdit( {
</BlockControls>
</>
) }
{ ! isEmpty && (
<InspectorControls>
<PanelBody
title={ __( 'Settings' ) }
className="blocks-table-settings"
>
<ToggleControl
label={ __( 'Fixed width table cells' ) }
checked={ !! hasFixedLayout }
onChange={ onChangeFixedLayout }
/>
<ToggleControl
label={ __( 'Header section' ) }
checked={ !! ( head && head.length ) }
onChange={ onToggleHeaderSection }
/>
<ToggleControl
label={ __( 'Footer section' ) }
checked={ !! ( foot && foot.length ) }
onChange={ onToggleFooterSection }
/>
</PanelBody>
</InspectorControls>
) }
<InspectorControls>
<PanelBody
title={ __( 'Settings' ) }
className="blocks-table-settings"
>
<ToggleControl
label={ __( 'Fixed width table cells' ) }
checked={ !! hasFixedLayout }
onChange={ onChangeFixedLayout }
/>
{ ! isEmpty && (
<>
<ToggleControl
label={ __( 'Header section' ) }
checked={ !! ( head && head.length ) }
onChange={ onToggleHeaderSection }
/>
<ToggleControl
label={ __( 'Footer section' ) }
checked={ !! ( foot && foot.length ) }
onChange={ onToggleFooterSection }
/>
</>
) }
</PanelBody>
</InspectorControls>
{ ! isEmpty && (
<table
className={ classnames(
Expand Down

0 comments on commit 7381ea5

Please sign in to comment.