diff --git a/packages/edit-site/src/components/global-styles/root-menu.js b/packages/edit-site/src/components/global-styles/root-menu.js index 9edfd064acbf7..a3cb326efe4d4 100644 --- a/packages/edit-site/src/components/global-styles/root-menu.js +++ b/packages/edit-site/src/components/global-styles/root-menu.js @@ -2,7 +2,7 @@ * WordPress dependencies */ import { __experimentalItemGroup as ItemGroup } from '@wordpress/components'; -import { typography, color, layout } from '@wordpress/icons'; +import { typography, color, layout, alignLeft } from '@wordpress/icons'; import { __ } from '@wordpress/i18n'; import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor'; @@ -40,6 +40,15 @@ function RootMenu() { { __( 'Typography' ) } ) } + { hasTypographyPanel && ( + + { __( 'Text alignment' ) } + + ) } { hasColorPanel && ( + + + + +
+ + { __( 'Alignment' ) } + { DEFAULT_ALIGNMENT_CONTROLS.map( + ( { icon, title, align } ) => ( + + ) + ) } + + { + // TODO: update the style with useGlobalStyle + // eslint-disable-next-line no-console + console.log( 'changed', value ); + } } + value="auto" + > + + + + + +
+ + ); +} + +export default ScreenTextAlignment; diff --git a/packages/edit-site/src/components/global-styles/ui.js b/packages/edit-site/src/components/global-styles/ui.js index 8d62da34f4966..0138b0b069ba0 100644 --- a/packages/edit-site/src/components/global-styles/ui.js +++ b/packages/edit-site/src/components/global-styles/ui.js @@ -39,6 +39,7 @@ import { import ScreenBlock from './screen-block'; import ScreenTypography from './screen-typography'; import ScreenTypographyElement from './screen-typography-element'; +import ScreenTextAlignment from './screen-text-alignment'; import ScreenColors from './screen-colors'; import ScreenColorPalette from './screen-color-palette'; import ScreenLayout from './screen-layout'; @@ -380,6 +381,10 @@ function GlobalStylesUI() { + + + +