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
… 3] (WordPress#65309)

* Fix patterns link button title to use 40px default size

* Fix open save panel button default size to 40px

* Fix editor sidebar buttons to use 40px defualt size

* Fix data views create new views buttons to use 40px default size

* Fix site hub buttons to use 40px default button size

---------

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
  • Loading branch information
4 people authored Sep 25, 2024
1 parent d9551aa commit 4a625e5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 22 deletions.
3 changes: 1 addition & 2 deletions packages/edit-site/src/components/page-patterns/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ function TitleField( { item } ) {
title
) : (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="link"
onClick={ onClick }
// Required for the grid's roving tab index system.
Expand Down
3 changes: 1 addition & 2 deletions packages/edit-site/src/components/save-panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ export default function SavePanel() {
} ) }
>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="secondary"
className="edit-site-editor__toggle-save-panel-button"
onClick={ () => setIsSaveViewOpened( true ) }
Expand Down
3 changes: 1 addition & 2 deletions packages/edit-site/src/components/sidebar-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import { Button } from '@wordpress/components';
export default function SidebarButton( props ) {
return (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
{ ...props }
className={ clsx( 'edit-site-sidebar-button', props.className ) }
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ function AddNewItemModalContent( { type, setIsAdding } ) {
/>
<HStack justify="right">
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="tertiary"
onClick={ () => {
setIsAdding( false );
Expand All @@ -99,8 +98,7 @@ function AddNewItemModalContent( { type, setIsAdding } ) {
</Button>

<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="primary"
type="submit"
aria-disabled={ ! title || isSaving }
Expand Down
18 changes: 6 additions & 12 deletions packages/edit-site/src/components/site-hub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ const SiteHub = memo(
) }
>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
ref={ ref }
href={ dashboardLink }
label={ __( 'Go to the Dashboard' ) }
Expand All @@ -80,8 +79,7 @@ const SiteHub = memo(
<HStack>
<div className="edit-site-site-hub__title">
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="link"
href={ homeUrl }
target="_blank"
Expand All @@ -101,8 +99,7 @@ const SiteHub = memo(
className="edit-site-site-hub__actions"
>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
className="edit-site-site-hub_toggle-command-center"
icon={ search }
onClick={ () => openCommandCenter() }
Expand Down Expand Up @@ -149,8 +146,7 @@ export const SiteHubMobile = memo(
) }
>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
ref={ ref }
label={ __( 'Go to Site Editor' ) }
className="edit-site-layout__view-mode-toggle"
Expand All @@ -170,8 +166,7 @@ export const SiteHubMobile = memo(
<HStack>
<div className="edit-site-site-hub__title">
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="link"
href={ homeUrl }
target="_blank"
Expand All @@ -186,8 +181,7 @@ export const SiteHubMobile = memo(
className="edit-site-site-hub__actions"
>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
className="edit-site-site-hub_toggle-command-center"
icon={ search }
onClick={ () => openCommandCenter() }
Expand Down

0 comments on commit 4a625e5

Please sign in to comment.