Skip to content

Commit

Permalink
Add __next40pxDefaultSize for files in editor 3 (#65139)
Browse files Browse the repository at this point in the history
* Add __next40pxDefaultSize for files in editor 3

* Address feedback

* change font size to 13 px

* Revert classic-theme.js changes as it will be a seperate PR and revert 13px size in style as it is default

* Wrap copy button in  InputControlSuffixWrapper

Co-authored-by: AKSHAT2802 <[email protected]>
Co-authored-by: tyxla <[email protected]>
Co-authored-by: ciampo <[email protected]>
Co-authored-by: mirka <[email protected]>
  • Loading branch information
5 people committed Sep 17, 2024
1 parent 1a23ed6 commit f82bc32
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,7 @@ export function HierarchicalTermSelector( { slug } ) {
{ ! loading && hasCreateAction && (
<FlexItem>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
onClick={ onToggleForm }
className="editor-post-taxonomies__hierarchical-terms-add"
aria-expanded={ showForm }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ export default function MostUsedTerms( { onSelect, taxonomy } ) {
{ terms.map( ( term ) => (
<li key={ term.id }>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="link"
onClick={ () => onSelect( term ) }
>
Expand Down
4 changes: 0 additions & 4 deletions packages/editor/src/components/post-taxonomies/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,4 @@
display: inline-block;
margin-right: $grid-unit-10;
}

.components-button {
font-size: 12px;
}
}
16 changes: 9 additions & 7 deletions packages/editor/src/components/post-url/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
Button,
__experimentalInputControl as InputControl,
__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,
__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,
__experimentalVStack as VStack,
} from '@wordpress/components';
import { store as noticesStore } from '@wordpress/notices';
Expand Down Expand Up @@ -109,13 +110,14 @@ export default function PostURL( { onClose } ) {
</InputControlPrefixWrapper>
}
suffix={
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
icon={ copySmall }
ref={ copyButtonRef }
label={ __( 'Copy' ) }
/>
<InputControlSuffixWrapper variant="control">
<Button
icon={ copySmall }
ref={ copyButtonRef }
size="small"
label="Copy"
/>
</InputControlSuffixWrapper>
}
label={ __( 'Link' ) }
hideLabelFromVision
Expand Down
8 changes: 2 additions & 6 deletions packages/editor/src/components/save-publish-panels/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,8 @@ export default function SavePublishPanels( {
unmountableContent = (
<div className="editor-layout__toggle-publish-panel">
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="secondary"
className="editor-layout__toggle-publish-panel-button"
onClick={ togglePublishSidebar }
aria-expanded={ false }
>
Expand All @@ -86,10 +84,8 @@ export default function SavePublishPanels( {
unmountableContent = (
<div className="editor-layout__toggle-entities-saved-states-panel">
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="secondary"
className="editor-layout__toggle-entities-saved-states-panel-button"
onClick={ openEntitiesSavedStates }
aria-expanded={ false }
disabled={ ! isDirty }
Expand Down

0 comments on commit f82bc32

Please sign in to comment.