Skip to content

Commit

Permalink
Apply __next40pxDefaultSize to Button in renaming UIs
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Dec 11, 2023
1 parent 8e3d374 commit 2775329
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 7 deletions.
7 changes: 6 additions & 1 deletion packages/block-editor/src/components/block-rename/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,16 @@ export default function BlockRenameModal( {
onFocus={ autoSelectInputText }
/>
<HStack justify="right">
<Button variant="tertiary" onClick={ onClose }>
<Button
__next40pxDefaultSize
variant="tertiary"
onClick={ onClose }
>
{ __( 'Cancel' ) }
</Button>

<Button
__next40pxDefaultSize
aria-disabled={ ! isNameValid }
variant="primary"
type="submit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export default function RenameMenuItem( { item, onClose } ) {

<HStack justify="right">
<Button
__next40pxDefaultSize
variant="tertiary"
onClick={ () => {
setIsModalOpen( false );
Expand All @@ -114,7 +115,11 @@ export default function RenameMenuItem( { item, onClose } ) {
{ __( 'Cancel' ) }
</Button>

<Button variant="primary" type="submit">
<Button
__next40pxDefaultSize
variant="primary"
type="submit"
>
{ __( 'Save' ) }
</Button>
</HStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ export default function RenameModal( { menuTitle, onClose, onSave } ) {
onChange={ setEditedMenuTitle }
/>
<HStack justify="right">
<Button variant="tertiary" onClick={ onClose }>
<Button
__next40pxDefaultSize
variant="tertiary"
onClick={ onClose }
>
{ __( 'Cancel' ) }
</Button>

<Button
__next40pxDefaultSize
disabled={ ! isEditedMenuTitleValid }
variant="primary"
type="submit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export default function RenameMenuItem( { template, onClose } ) {

<HStack justify="right">
<Button
__next40pxDefaultSize
variant="tertiary"
onClick={ () => {
setIsModalOpen( false );
Expand All @@ -124,7 +125,11 @@ export default function RenameMenuItem( { template, onClose } ) {
{ __( 'Cancel' ) }
</Button>

<Button variant="primary" type="submit">
<Button
__next40pxDefaultSize
variant="primary"
type="submit"
>
{ __( 'Save' ) }
</Button>
</HStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,15 @@ export default function RenamePatternCategoryModal( {
) }
</VStack>
<HStack justify="right">
<Button variant="tertiary" onClick={ onRequestClose }>
<Button
__next40pxDefaultSize
variant="tertiary"
onClick={ onRequestClose }
>
{ __( 'Cancel' ) }
</Button>
<Button
__next40pxDefaultSize
variant="primary"
type="submit"
aria-disabled={
Expand Down
12 changes: 10 additions & 2 deletions packages/patterns/src/components/rename-pattern-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,19 @@ export default function RenamePatternModal( {
/>

<HStack justify="right">
<Button variant="tertiary" onClick={ onRequestClose }>
<Button
__next40pxDefaultSize
variant="tertiary"
onClick={ onRequestClose }
>
{ __( 'Cancel' ) }
</Button>

<Button variant="primary" type="submit">
<Button
__next40pxDefaultSize
variant="primary"
type="submit"
>
{ __( 'Save' ) }
</Button>
</HStack>
Expand Down

0 comments on commit 2775329

Please sign in to comment.