Skip to content

Commit 59bc5be

Browse files
committed
Block Editor: remove usage of Emotion
1 parent 18f50cd commit 59bc5be

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

package-lock.json

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/block-editor/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@
5252
"build-module/hooks/**"
5353
],
5454
"dependencies": {
55-
"@emotion/react": "^11.7.1",
56-
"@emotion/styled": "^11.6.0",
5755
"@react-spring/web": "^9.4.5",
5856
"@wordpress/a11y": "file:../a11y",
5957
"@wordpress/api-fetch": "file:../api-fetch",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.single-column {
2+
grid-column: span 1;
3+
}

packages/block-editor/src/components/dimensions-tool/width-height-tool.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* External dependencies
3-
*/
4-
import styled from '@emotion/styled';
5-
61
/**
72
* WordPress dependencies
83
*/
@@ -12,9 +7,10 @@ import {
127
} from '@wordpress/components';
138
import { __ } from '@wordpress/i18n';
149

15-
const SingleColumnToolsPanelItem = styled( ToolsPanelItem )`
16-
grid-column: span 1;
17-
`;
10+
/**
11+
* Internal dependencies
12+
*/
13+
import styles from './style.module.css';
1814

1915
/**
2016
* @typedef {import('@wordpress/components/build-types/unit-control/types').WPUnitControlUnit} WPUnitControlUnit
@@ -72,7 +68,8 @@ export default function WidthHeightTool( {
7268

7369
return (
7470
<>
75-
<SingleColumnToolsPanelItem
71+
<ToolsPanelItem
72+
className={ styles[ 'single-column' ] }
7673
label={ __( 'Width' ) }
7774
isShownByDefault={ isShownByDefault }
7875
hasValue={ () => width !== '' }
@@ -89,8 +86,9 @@ export default function WidthHeightTool( {
8986
onChange={ onDimensionChange( 'width' ) }
9087
size="__unstable-large"
9188
/>
92-
</SingleColumnToolsPanelItem>
93-
<SingleColumnToolsPanelItem
89+
</ToolsPanelItem>
90+
<ToolsPanelItem
91+
className={ styles[ 'single-column' ] }
9492
label={ __( 'Height' ) }
9593
isShownByDefault={ isShownByDefault }
9694
hasValue={ () => height !== '' }
@@ -107,7 +105,7 @@ export default function WidthHeightTool( {
107105
onChange={ onDimensionChange( 'height' ) }
108106
size="__unstable-large"
109107
/>
110-
</SingleColumnToolsPanelItem>
108+
</ToolsPanelItem>
111109
</>
112110
);
113111
}

0 commit comments

Comments
 (0)