Skip to content

Commit bed7639

Browse files
Icons: Add align-item related icons (WordPress#66242)
* Icons: Add align-item related icons * Use `justify` prefix Co-authored-by: t-hamano <[email protected]> Co-authored-by: jameskoster <[email protected]>
1 parent 8170442 commit bed7639

File tree

8 files changed

+76
-49
lines changed

8 files changed

+76
-49
lines changed

packages/block-editor/src/components/block-vertical-alignment-control/icons.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

packages/block-editor/src/components/block-vertical-alignment-control/ui.js

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,33 @@
33
*/
44
import { _x } from '@wordpress/i18n';
55
import { ToolbarGroup, ToolbarDropdownMenu } from '@wordpress/components';
6-
7-
/**
8-
* Internal dependencies
9-
*/
106
import {
11-
alignTop,
12-
alignCenter,
13-
alignBottom,
14-
alignStretch,
15-
spaceBetween,
16-
} from './icons';
7+
justifyTop,
8+
justifyCenterVertical,
9+
justifyBottom,
10+
justifyStretchVertical,
11+
justifySpaceBetweenVertical,
12+
} from '@wordpress/icons';
1713

1814
const BLOCK_ALIGNMENTS_CONTROLS = {
1915
top: {
20-
icon: alignTop,
16+
icon: justifyTop,
2117
title: _x( 'Align top', 'Block vertical alignment setting' ),
2218
},
2319
center: {
24-
icon: alignCenter,
20+
icon: justifyCenterVertical,
2521
title: _x( 'Align middle', 'Block vertical alignment setting' ),
2622
},
2723
bottom: {
28-
icon: alignBottom,
24+
icon: justifyBottom,
2925
title: _x( 'Align bottom', 'Block vertical alignment setting' ),
3026
},
3127
stretch: {
32-
icon: alignStretch,
28+
icon: justifyStretchVertical,
3329
title: _x( 'Stretch to fill', 'Block vertical alignment setting' ),
3430
},
3531
'space-between': {
36-
icon: spaceBetween,
32+
icon: justifySpaceBetweenVertical,
3733
title: _x( 'Space between', 'Block vertical alignment setting' ),
3834
},
3935
};

packages/icons/src/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,16 @@ export { default as image } from './library/image';
130130
export { default as info } from './library/info';
131131
export { default as insertAfter } from './library/insert-after';
132132
export { default as insertBefore } from './library/insert-before';
133+
export { default as justifyBottom } from './library/justify-bottom';
133134
export { default as justifyLeft } from './library/justify-left';
134135
export { default as justifyCenter } from './library/justify-center';
136+
export { default as justifyCenterVertical } from './library/justify-center-vertical';
135137
export { default as justifyRight } from './library/justify-right';
136138
export { default as justifySpaceBetween } from './library/justify-space-between';
139+
export { default as justifySpaceBetweenVertical } from './library/justify-space-between-vertical';
137140
export { default as justifyStretch } from './library/justify-stretch';
141+
export { default as justifyStretchVertical } from './library/justify-stretch-vertical';
142+
export { default as justifyTop } from './library/justify-top';
138143
export { default as key } from './library/key';
139144
export { default as keyboard } from './library/keyboard';
140145
export { default as keyboardClose } from './library/keyboard-close';
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* WordPress dependencies
3+
*/
4+
import { SVG, Path } from '@wordpress/primitives';
5+
6+
const justifyBottom = (
7+
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
8+
<Path d="M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z" />
9+
</SVG>
10+
);
11+
12+
export default justifyBottom;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* WordPress dependencies
3+
*/
4+
import { SVG, Path } from '@wordpress/primitives';
5+
6+
const justifyCenterVertical = (
7+
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
8+
<Path d="M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z" />
9+
</SVG>
10+
);
11+
12+
export default justifyCenterVertical;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* WordPress dependencies
3+
*/
4+
import { SVG, Path } from '@wordpress/primitives';
5+
6+
const justifySpaceBetweenVertical = (
7+
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
8+
<Path d="M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z" />
9+
</SVG>
10+
);
11+
12+
export default justifySpaceBetweenVertical;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* WordPress dependencies
3+
*/
4+
import { SVG, Path } from '@wordpress/primitives';
5+
6+
const justifyStretchVertical = (
7+
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
8+
<Path d="M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z" />
9+
</SVG>
10+
);
11+
12+
export default justifyStretchVertical;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* WordPress dependencies
3+
*/
4+
import { SVG, Path } from '@wordpress/primitives';
5+
6+
const justifyTop = (
7+
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
8+
<Path d="M9 20h6V9H9v11zM4 4v1.5h16V4H4z" />
9+
</SVG>
10+
);
11+
12+
export default justifyTop;

0 commit comments

Comments
 (0)