Skip to content

Commit

Permalink
Design changes
Browse files Browse the repository at this point in the history
  • Loading branch information
karthick-murugan committed Dec 13, 2024
1 parent f078128 commit f4851be
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/block-library/src/latest-posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
onChange={ ( value ) =>
setAttributes( { displayPostContent: value } )
}
className={
displayPostContent
? 'latest-posts-toggle-control-margin-bottom'
: ''
}
/>
{ displayPostContent && (
<RadioControl
Expand Down Expand Up @@ -311,8 +316,8 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
onChange={ ( value ) =>
setAttributes( { displayAuthor: value } )
}
className="latest-posts-toggle-control-margin-bottom"
/>
<div className="components-base-control__field"></div>
<ToggleControl
__nextHasNoMarginBottom
label={ __( 'Display post date' ) }
Expand Down Expand Up @@ -351,6 +356,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
onChange={ ( value ) =>
setAttributes( { displayFeaturedImage: value } )
}
className="latest-posts-toggle-control-margin-bottom"
/>
{ displayFeaturedImage && (
<>
Expand Down Expand Up @@ -421,6 +427,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
addLinkToFeaturedImage: value,
} )
}
className="latest-posts-toggle-control-margin-top"
/>
</>
) }
Expand Down
8 changes: 8 additions & 0 deletions packages/block-library/src/latest-posts/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@
padding-left: 0;
}
}

.latest-posts-toggle-control-margin-bottom {
margin-bottom: 15px !important;
}

.latest-posts-toggle-control-margin-top {
margin-top: 15px !important;
}

0 comments on commit f4851be

Please sign in to comment.