Skip to content

Commit

Permalink
Fix: Button: Replace remaining 40px default size violation [Block lib…
Browse files Browse the repository at this point in the history
…rary 4] (WordPress#65143)

* Fix query placeholder button size to use 40px default size

* Fix template part placeholder to use default 40px button size

* Fix video block poster image to use 40px default button size

* Fix video poster image remove button to use 40px default size

* Fix video track list buttons to use 40px default size

* Fix enhanced pagination modal to use 40px default button size

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
  • Loading branch information
3 people committed Sep 10, 2024
1 parent a925dcd commit ff0c475
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ export default function EnhancedPaginationModal( {
<VStack alignment="right" spacing={ 5 }>
<span id={ modalDescriptionId }>{ notice }</span>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="primary"
onClick={ closeModal }
>
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/query/edit/query-placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ export default function QueryPlaceholder( {
>
{ !! hasPatterns && (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="primary"
onClick={ openPatternSelectionModal }
>
Expand All @@ -89,8 +88,7 @@ export default function QueryPlaceholder( {
) }

<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="secondary"
onClick={ () => {
setIsStartingBlank( true );
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/template-part/edit/placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ export default function TemplatePartPlaceholder( {
{ ! isResolving &&
!! ( templateParts.length || blockPatterns.length ) && (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="primary"
onClick={ onOpenSelectionModal }
>
Expand All @@ -86,8 +85,7 @@ export default function TemplatePartPlaceholder( {

{ ! isResolving && isBlockBasedTheme && canCreateTemplatePart && (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="secondary"
onClick={ () => {
setShowTitleModal( true );
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/video/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ function VideoEdit( {
}
render={ ( { open } ) => (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="primary"
onClick={ open }
ref={ posterImageButton }
Expand Down Expand Up @@ -262,8 +261,7 @@ function VideoEdit( {
</p>
{ !! poster && (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
onClick={ onRemovePoster }
variant="tertiary"
>
Expand Down
9 changes: 3 additions & 6 deletions packages/block-library/src/video/tracks-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ function TrackList( { tracks, onEditPress } ) {
>
<span>{ track.label } </span>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="tertiary"
onClick={ () => onEditPress( index ) }
aria-label={ sprintf(
Expand Down Expand Up @@ -147,8 +146,7 @@ function SingleTrackEditor( { track, onChange, onClose, onRemove } ) {
/>
<HStack className="block-library-video-tracks-editor__single-track-editor-buttons-container">
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="secondary"
onClick={ () => {
const changes = {};
Expand Down Expand Up @@ -177,8 +175,7 @@ function SingleTrackEditor( { track, onChange, onClose, onRemove } ) {
{ __( 'Close' ) }
</Button>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
isDestructive
variant="link"
onClick={ onRemove }
Expand Down

0 comments on commit ff0c475

Please sign in to comment.