Skip to content

Commit

Permalink
Fix: Button: Replace remaining 40px default size violations [Block li…
Browse files Browse the repository at this point in the history
…brary 1] (#65033)

* Fix legacy comments to use 40px default button size

* Fix the embed placeholder button to use 40px default button size

* Fix freeform block to use 40px default button size

* Fix missing block to use 40px default button size

* Revert the instance for modal fullscreen button size

This is being reverted because we need to resolve this first - #65033 (comment)

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
  • Loading branch information
3 people committed Sep 6, 2024
1 parent 95c1995 commit c90f1c5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions packages/block-library/src/comments/edit/comments-legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export default function CommentsLegacy( {

const actions = [
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
key="convert"
onClick={ () => void setAttributes( { legacy: false } ) }
variant="primary"
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/embed/embed-placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,14 @@ const EmbedPlaceholder = ( {
justify="flex-start"
>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="secondary"
onClick={ tryAgain }
>
{ _x( 'Try again', 'button label' ) }
</Button>{ ' ' }
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="secondary"
onClick={ fallback }
>
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/freeform/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ export default function ModalEdit( props ) {
>
<FlexItem>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="tertiary"
onClick={ onClose }
>
Expand All @@ -133,8 +132,7 @@ export default function ModalEdit( props ) {
</FlexItem>
<FlexItem>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="primary"
onClick={ () => {
setAttributes( {
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/missing/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ export default function MissingEdit( { attributes, clientId } ) {

const convertToHtmlButton = (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
key="convert"
onClick={ convertToHTML }
variant="primary"
Expand Down

0 comments on commit c90f1c5

Please sign in to comment.