Skip to content

Commit

Permalink
Fix: Button: Replace remaining 40px default size violation [Edit Site…
Browse files Browse the repository at this point in the history
… 1] (WordPress#65226)

* Fix custom template modal button suggestion list to use default 40px button height

* Fix the add new template modal item button to use 40px default size

* Fix editor canvas close button to use 40px default button size

* Fix add the editor index back button for edit site to use 40px default size

* Fix the copy error button size for error boundry warning to use 40px default size

Co-authored-by: hbhalodia <[email protected]>
Co-authored-by: mirka <[email protected]>
  • Loading branch information
3 people authored Sep 19, 2024
1 parent 6daffdb commit eb715c2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ function SuggestionListItem( {
<Composite.Item
render={
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
role="option"
className={ baseCssClass }
onClick={ () =>
Expand Down
3 changes: 1 addition & 2 deletions packages/edit-site/src/components/add-new-template/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ function TemplateListItem( {
} ) {
return (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
className={ className }
onClick={ onClick }
label={ description }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ function EditorCanvasContainer( {
>
{ shouldShowCloseButton && (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
className="edit-site-editor-canvas-container__close-button"
icon={ closeSmall }
label={ closeButtonLabel || __( 'Close' ) }
Expand Down
3 changes: 1 addition & 2 deletions packages/edit-site/src/components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,7 @@ export default function EditSiteEditor( { isPostsList = false } ) {
whileTap="tap"
>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
label={ __( 'Open Navigation' ) }
showTooltip
tooltipPosition="middle right"
Expand Down
7 changes: 1 addition & 6 deletions packages/edit-site/src/components/error-boundary/warning.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ import { useCopyToClipboard } from '@wordpress/compose';
function CopyButton( { text, children } ) {
const ref = useCopyToClipboard( text );
return (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
variant="secondary"
ref={ ref }
>
<Button __next40pxDefaultSize variant="secondary" ref={ ref }>
{ children }
</Button>
);
Expand Down

0 comments on commit eb715c2

Please sign in to comment.