Skip to content

Commit

Permalink
Add vertical anchoring controls to Settings tabs also
Browse files Browse the repository at this point in the history
  • Loading branch information
razwan committed Jul 20, 2020
1 parent fe00ffa commit d9297d6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
11 changes: 9 additions & 2 deletions dist/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -29372,7 +29372,7 @@ var withSpaceAndSizingControls = with_space_and_sizing_controls_createHigherOrde
}));
setAttributes(newAttributes);
}
}), Object(external_React_["createElement"])(with_space_and_sizing_controls_PanelRow, null, Object(external_React_["createElement"])("span", null, with_space_and_sizing_controls_('Vertical', '__plugin_txtd')), Object(external_React_["createElement"])(block_vertical_alignment_toolbar, {
}), Object(external_React_["createElement"])(with_space_and_sizing_controls_PanelRow, null, Object(external_React_["createElement"])("span", null, with_space_and_sizing_controls_('Vertical Anchoring', '__plugin_txtd')), Object(external_React_["createElement"])(block_vertical_alignment_toolbar, {
value: verticalAlignment,
onChange: function onChange(verticalAlignment) {
var newAttributes = getEmphasisAttributes(with_space_and_sizing_controls_objectSpread(with_space_and_sizing_controls_objectSpread({}, attributes), {}, {
Expand All @@ -29384,7 +29384,14 @@ var withSpaceAndSizingControls = with_space_and_sizing_controls_createHigherOrde
label: with_space_and_sizing_controls_('Settings')
}, Object(external_React_["createElement"])("div", {
key: 'space-and-sizing-settings-1'
}, Object(external_React_["createElement"])(controls_group, {
}, Object(external_React_["createElement"])(controls_group, null, Object(external_React_["createElement"])(with_space_and_sizing_controls_PanelRow, null, Object(external_React_["createElement"])("span", null, with_space_and_sizing_controls_('Vertical Anchoring', '__plugin_txtd')), Object(external_React_["createElement"])(block_vertical_alignment_toolbar, {
value: verticalAlignment,
onChange: function onChange(nextVerticalAlignment) {
return setAttributes({
verticalAlignment: nextVerticalAlignment
});
}
}))), Object(external_React_["createElement"])(controls_group, {
title: with_space_and_sizing_controls_('Block Spacing')
}, Object(external_React_["createElement"])(with_space_and_sizing_controls_RangeControl, {
key: 'media-card-block-top-spacing',
Expand Down
2 changes: 1 addition & 1 deletion dist/js/editor.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/editor.min.js

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion src/filters/with-space-and-sizing-controls/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const withSpaceAndSizingControls = createHigherOrderComponent( OriginalComponent
} }
/>
<PanelRow>
<span>{ __( 'Vertical', '__plugin_txtd' ) }</span>
<span>{ __( 'Vertical Anchoring', '__plugin_txtd' ) }</span>
<BlockVerticalAlignmentToolbar
value={ verticalAlignment }
onChange={ ( verticalAlignment ) => {
Expand All @@ -191,6 +191,15 @@ const withSpaceAndSizingControls = createHigherOrderComponent( OriginalComponent
</ControlsTab>
<ControlsTab label={ __( 'Settings' ) }>
<div key={ 'space-and-sizing-settings-1' }>
<ControlsGroup>
<PanelRow>
<span>{ __( 'Vertical Anchoring', '__plugin_txtd' ) }</span>
<BlockVerticalAlignmentToolbar
value={ verticalAlignment }
onChange={ ( nextVerticalAlignment ) => setAttributes( { verticalAlignment: nextVerticalAlignment } ) }
/>
</PanelRow>
</ControlsGroup>
<ControlsGroup title={ __( 'Block Spacing' ) }>
<RangeControl
key={ 'media-card-block-top-spacing' }
Expand Down

0 comments on commit d9297d6

Please sign in to comment.