Skip to content

Commit

Permalink
fix dropdown defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
kadencewp committed Sep 3, 2024
1 parent 1641c42 commit 864a8a6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/blocks/navigation-link/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -734,13 +734,13 @@
"type": "array",
"default": [
{
"enable": true,
"enable": false,
"color": "#000000",
"opacity": 0.2,
"opacity": 0.1,
"spread": 0,
"blur": 2,
"hOffset": 1,
"vOffset": 1,
"blur": 13,
"hOffset": 0,
"vOffset": 2,
"inset": false
}
]
Expand Down
1 change: 1 addition & 0 deletions src/blocks/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ export default function Edit(props) {
iconSideTablet,
iconSideMobile,
align,
dropdownShadow,
kadenceDynamic,
} = attributes;

Expand Down
16 changes: 10 additions & 6 deletions src/blocks/navigation/edit-inner.js
Original file line number Diff line number Diff line change
Expand Up @@ -1264,9 +1264,9 @@ export function EditInner(props) {

<ResponsiveRangeControls
label={__('Dropdown Width', 'kadence-blocks')}
value={parseFloat(dropdownWidth)}
valueTablet={parseFloat(dropdownWidthTablet)}
valueMobile={parseFloat(dropdownWidthMobile)}
value={dropdownWidth ? parseFloat(dropdownWidth) : ''}
valueTablet={dropdownWidthTablet ? parseFloat(dropdownWidthTablet) : ''}
valueMobile={dropdownWidthMobile ? parseFloat(dropdownWidthMobile) : ''}
onChange={(value) => setMetaAttribute(value.toString(), 'dropdownWidth')}
onChangeTablet={(value) =>
setMetaAttribute(value.toString(), 'dropdownWidthTablet')
Expand All @@ -1293,9 +1293,13 @@ export function EditInner(props) {
)}
<ResponsiveRangeControls
label={__('Dropdown Item Vertical Spacing', 'kadence-blocks')}
value={parseFloat(dropdownVerticalSpacing)}
valueTablet={parseFloat(dropdownVerticalSpacingTablet)}
valueMobile={parseFloat(dropdownVerticalSpacingMobile)}
value={dropdownVerticalSpacing ? parseFloat(dropdownVerticalSpacing) : ''}
valueTablet={
dropdownVerticalSpacingTablet ? parseFloat(dropdownVerticalSpacingTablet) : ''
}
valueMobile={
dropdownVerticalSpacingMobile ? parseFloat(dropdownVerticalSpacingMobile) : ''
}
onChange={(value) => setMetaAttribute(value.toString(), 'dropdownVerticalSpacing')}
onChangeTablet={(value) =>
setMetaAttribute(value.toString(), 'dropdownVerticalSpacingTablet')
Expand Down

0 comments on commit 864a8a6

Please sign in to comment.