Skip to content

Commit

Permalink
rewording the fill and center setting to make more sense with alignme…
Browse files Browse the repository at this point in the history
…nt ability

Also hidding the parent navigation alignment setting untill it can actually affect something
  • Loading branch information
mark-c-woodard committed Nov 19, 2024
1 parent 9a692d8 commit e7d1a06
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/blocks/navigation/edit-inner.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ export function EditInner(props) {
horizontalLayoutTablet,
horizontalLayoutMobile
);
const previewStretchFill = getPreviewSize(previewDevice, stretchFill, stretchFillTablet, stretchFillMobile);

const setMetaAttribute = (value, key) => {
setMeta({ ...meta, ['_kad_navigation_' + key]: value });
};
Expand Down Expand Up @@ -1421,12 +1423,12 @@ export function EditInner(props) {
mobileValue={stretchFillMobile}
options={[
{ value: 'standard', label: __('Standard', 'kadence-blocks') },
{ value: 'fill', label: __('Fill and Center', 'kadence-blocks') },
{ value: 'fill', label: __('Fill and Center Default', 'kadence-blocks') },
]}
tabletOptions={[
{ value: '', label: __('Inherit', 'kadence-blocks') },
{ value: 'standard', label: __('Standard', 'kadence-blocks') },
{ value: 'fill', label: __('Fill and Center', 'kadence-blocks') },
{ value: 'fill', label: __('Fill and Center Default', 'kadence-blocks') },
]}
onChange={(value) => setMetaAttribute(value, 'stretchFill')}
onChangeTablet={(value) => setMetaAttribute(value, 'stretchFillTablet')}
Expand Down Expand Up @@ -1483,16 +1485,18 @@ export function EditInner(props) {
setMetaAttribute={setMetaAttribute}
attributes={metaAttributes}
/>

<ResponsiveAlignControls
label={__('Alignment', 'kadence-blocks')}
value={linkHorizontalAlignment ? linkHorizontalAlignment : ''}
tabletValue={linkHorizontalAlignmentTablet ? linkHorizontalAlignmentTablet : ''}
mobileValue={linkHorizontalAlignmentMobile ? linkHorizontalAlignmentMobile : ''}
onChange={(value) => setMetaAttribute(value, 'linkHorizontalAlignment')}
onChangeTablet={(value) => setMetaAttribute(value, 'linkHorizontalAlignmentTablet')}
onChangeMobile={(value) => setMetaAttribute(value, 'linkHorizontalAlignmentMobile')}
/>
{(previewOrientation == 'vertical' ||
(previewHorizontalLayout === 'stretch' && previewStretchFill == 'fill')) && (
<ResponsiveAlignControls
label={__('Alignment', 'kadence-blocks')}
value={linkHorizontalAlignment ? linkHorizontalAlignment : ''}
tabletValue={linkHorizontalAlignmentTablet ? linkHorizontalAlignmentTablet : ''}
mobileValue={linkHorizontalAlignmentMobile ? linkHorizontalAlignmentMobile : ''}
onChange={(value) => setMetaAttribute(value, 'linkHorizontalAlignment')}
onChangeTablet={(value) => setMetaAttribute(value, 'linkHorizontalAlignmentTablet')}
onChangeMobile={(value) => setMetaAttribute(value, 'linkHorizontalAlignmentMobile')}
/>
)}
</KadencePanelBody>
{context?.['kadence/headerIsTransparent'] == '1' && (
<KadencePanelBody
Expand Down

0 comments on commit e7d1a06

Please sign in to comment.