Skip to content

Commit

Permalink
Add __next40pxDefaultSize for files in editor 4 (WordPress#65140)
Browse files Browse the repository at this point in the history
* Add __next40pxDefaultSize in button for editor 3 files

* address feedback

Co-authored-by: AKSHAT2802 <akshat2802@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
  • Loading branch information
4 people committed Sep 12, 2024
1 parent 0e671a2 commit 394288f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ function StartModal( { slug, isCustom, onClose, postType } ) {
>
<FlexItem>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="tertiary"
onClick={ onClose }
>
Expand Down
3 changes: 1 addition & 2 deletions packages/editor/src/components/table-of-contents/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ function TableOfContents(
contentClassName="table-of-contents__popover"
renderToggle={ ( { isOpen, onToggle } ) => (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
{ ...props }
ref={ ref }
onClick={ hasBlocks ? onToggle : undefined }
Expand Down
3 changes: 1 addition & 2 deletions packages/editor/src/components/text-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ export default function TextEditor( { autoFocus = false } ) {
<div className="editor-text-editor__toolbar">
<h2>{ __( 'Editing code' ) }</h2>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="tertiary"
onClick={ () => switchEditorMode( 'visual' ) }
shortcut={ shortcut }
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/text-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
}

h2 {
line-height: $button-size;
line-height: $button-size-next-default-40px;
margin: 0 auto 0 0;
font-size: $default-font-size;
color: $gray-900;
Expand Down
6 changes: 2 additions & 4 deletions packages/editor/src/dataviews/actions/reset-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ const resetPost: Action< Post > = {
</Text>
<HStack justify="right">
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="tertiary"
onClick={ closeModal }
disabled={ isBusy }
Expand All @@ -124,8 +123,7 @@ const resetPost: Action< Post > = {
{ __( 'Cancel' ) }
</Button>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="primary"
onClick={ async () => {
setIsBusy( true );
Expand Down
6 changes: 2 additions & 4 deletions packages/editor/src/dataviews/actions/trash-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ const trashPost: Action< PostWithPermissions > = {
</Text>
<HStack justify="right">
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="tertiary"
onClick={ closeModal }
disabled={ isBusy }
Expand All @@ -77,8 +76,7 @@ const trashPost: Action< PostWithPermissions > = {
{ __( 'Cancel' ) }
</Button>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="primary"
onClick={ async () => {
setIsBusy( true );
Expand Down

0 comments on commit 394288f

Please sign in to comment.