diff --git a/packages/block-library/src/post-author/edit.js b/packages/block-library/src/post-author/edit.js index f702a189e4012..6110b36338230 100644 --- a/packages/block-library/src/post-author/edit.js +++ b/packages/block-library/src/post-author/edit.js @@ -8,7 +8,7 @@ import classnames from 'classnames'; * WordPress dependencies */ import { - AlignmentToolbar, + AlignmentControl, BlockControls, InspectorControls, RichText, @@ -117,8 +117,8 @@ function PostAuthorEdit( { isSelected, context, attributes, setAttributes } ) { - - + { setAttributes( { textAlign: nextAlign } ); diff --git a/packages/block-library/src/post-comments-count/edit.js b/packages/block-library/src/post-comments-count/edit.js index 9f9f87939bfa7..2b3d309082495 100644 --- a/packages/block-library/src/post-comments-count/edit.js +++ b/packages/block-library/src/post-comments-count/edit.js @@ -7,7 +7,7 @@ import classnames from 'classnames'; * WordPress dependencies */ import { - AlignmentToolbar, + AlignmentControl, BlockControls, Warning, useBlockProps, @@ -51,8 +51,8 @@ export default function PostCommentsCountEdit( { return ( <> - - + { setAttributes( { textAlign: nextAlign } ); diff --git a/packages/block-library/src/post-comments-form/edit.js b/packages/block-library/src/post-comments-form/edit.js index da6751e0e30db..ed2e0b514b748 100644 --- a/packages/block-library/src/post-comments-form/edit.js +++ b/packages/block-library/src/post-comments-form/edit.js @@ -7,7 +7,7 @@ import classnames from 'classnames'; * WordPress dependencies */ import { - AlignmentToolbar, + AlignmentControl, BlockControls, Warning, useBlockProps, @@ -36,8 +36,8 @@ export default function PostCommentsFormEdit( { return ( <> - - + { setAttributes( { textAlign: nextAlign } ); diff --git a/packages/block-library/src/post-comments-link/edit.js b/packages/block-library/src/post-comments-link/edit.js index d95da9073dc8b..36e617c55a3e7 100644 --- a/packages/block-library/src/post-comments-link/edit.js +++ b/packages/block-library/src/post-comments-link/edit.js @@ -7,7 +7,7 @@ import classnames from 'classnames'; * WordPress dependencies */ import { - AlignmentToolbar, + AlignmentControl, BlockControls, Warning, useBlockProps, @@ -82,8 +82,8 @@ function PostCommentsLinkEdit( { context, attributes, setAttributes } ) { return ( <> - - + { setAttributes( { textAlign: nextAlign } ); diff --git a/packages/block-library/src/post-comments/edit.js b/packages/block-library/src/post-comments/edit.js index 9dc1ae607102b..237569227c61e 100644 --- a/packages/block-library/src/post-comments/edit.js +++ b/packages/block-library/src/post-comments/edit.js @@ -8,7 +8,7 @@ import classnames from 'classnames'; */ import { useSelect } from '@wordpress/data'; import { - AlignmentToolbar, + AlignmentControl, BlockControls, Warning, useBlockProps, @@ -68,8 +68,8 @@ export default function PostCommentsEdit( { return ( <> - - + { setAttributes( { textAlign: nextAlign } ); diff --git a/packages/block-library/src/post-date/edit.js b/packages/block-library/src/post-date/edit.js index 9421de7d53e39..5e38d307404da 100644 --- a/packages/block-library/src/post-date/edit.js +++ b/packages/block-library/src/post-date/edit.js @@ -10,13 +10,12 @@ import { useEntityProp } from '@wordpress/core-data'; import { useState } from '@wordpress/element'; import { __experimentalGetSettings, dateI18n } from '@wordpress/date'; import { - AlignmentToolbar, + AlignmentControl, BlockControls, InspectorControls, useBlockProps, } from '@wordpress/block-editor'; import { - ToolbarGroup, ToolbarButton, ToggleControl, Popover, @@ -91,8 +90,8 @@ export default function PostDateEdit( { attributes, context, setAttributes } ) { } return ( <> - - + { setAttributes( { textAlign: nextAlign } ); @@ -100,17 +99,15 @@ export default function PostDateEdit( { attributes, context, setAttributes } ) { /> { date && ( - - - setIsPickerOpen( - ( _isPickerOpen ) => ! _isPickerOpen - ) - } - /> - + + setIsPickerOpen( + ( _isPickerOpen ) => ! _isPickerOpen + ) + } + /> ) } diff --git a/packages/block-library/src/post-title/edit.js b/packages/block-library/src/post-title/edit.js index 6c3a8913bbf84..2bd3e69d00b6f 100644 --- a/packages/block-library/src/post-title/edit.js +++ b/packages/block-library/src/post-title/edit.js @@ -8,18 +8,13 @@ import classnames from 'classnames'; */ import { useSelect, useDispatch } from '@wordpress/data'; import { - AlignmentToolbar, + AlignmentControl, BlockControls, InspectorControls, useBlockProps, PlainText, } from '@wordpress/block-editor'; -import { - ToolbarGroup, - ToggleControl, - TextControl, - PanelBody, -} from '@wordpress/components'; +import { ToggleControl, TextControl, PanelBody } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { store as coreStore } from '@wordpress/core-data'; @@ -104,16 +99,14 @@ export default function PostTitleEdit( { return ( <> - - - - setAttributes( { level: newLevel } ) - } - /> - - + + setAttributes( { level: newLevel } ) + } + /> + { setAttributes( { textAlign: nextAlign } ); diff --git a/packages/block-library/src/query-title/edit.js b/packages/block-library/src/query-title/edit.js index c57c843bff8e4..c90c2627812ca 100644 --- a/packages/block-library/src/query-title/edit.js +++ b/packages/block-library/src/query-title/edit.js @@ -8,12 +8,11 @@ import classnames from 'classnames'; */ // import { useSelect, useDispatch } from '@wordpress/data'; import { - AlignmentToolbar, + AlignmentControl, BlockControls, useBlockProps, Warning, } from '@wordpress/block-editor'; -import { ToolbarGroup } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; /** @@ -52,16 +51,14 @@ export default function QueryTitleEdit( { } return ( <> - - - - setAttributes( { level: newLevel } ) - } - /> - - + + setAttributes( { level: newLevel } ) + } + /> + { setAttributes( { textAlign: nextAlign } ); diff --git a/packages/block-library/src/site-tagline/edit.js b/packages/block-library/src/site-tagline/edit.js index faf839c0bfb65..33c4c72aad9e9 100644 --- a/packages/block-library/src/site-tagline/edit.js +++ b/packages/block-library/src/site-tagline/edit.js @@ -8,7 +8,7 @@ import classnames from 'classnames'; */ import { useEntityProp } from '@wordpress/core-data'; import { - AlignmentToolbar, + AlignmentControl, useBlockProps, BlockControls, RichText, @@ -29,8 +29,8 @@ export default function SiteTaglineEdit( { attributes, setAttributes } ) { } ); return ( <> - - + setAttributes( { textAlign: newAlign } ) } diff --git a/packages/block-library/src/social-links/edit.js b/packages/block-library/src/social-links/edit.js index 893990822d440..7a3c8e611bdbc 100644 --- a/packages/block-library/src/social-links/edit.js +++ b/packages/block-library/src/social-links/edit.js @@ -14,19 +14,17 @@ import { __experimentalUseInnerBlocksProps as useInnerBlocksProps, useBlockProps, InspectorControls, - JustifyToolbar, + JustifyContentControl, ContrastChecker, PanelColorSettings, withColors, } from '@wordpress/block-editor'; import { - DropdownMenu, MenuGroup, MenuItem, PanelBody, ToggleControl, - ToolbarItem, - ToolbarGroup, + ToolbarDropdownMenu, } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { check } from '@wordpress/icons'; @@ -114,8 +112,8 @@ export function SocialLinksEdit( props ) { return ( - - + - - - { ( toggleProps ) => ( - - { ( { onClose } ) => ( - - { sizeOptions.map( ( entry ) => { - return ( - { - setAttributes( { - size: entry.value, - } ); - } } - onClose={ onClose } - role="menuitemradio" - > - { entry.name } - - ); - } ) } - - ) } - - ) } - - + + + + { ( { onClose } ) => ( + + { sizeOptions.map( ( entry ) => { + return ( + { + setAttributes( { + size: entry.value, + } ); + } } + onClose={ onClose } + role="menuitemradio" + > + { entry.name } + + ); + } ) } + + ) } + diff --git a/packages/block-library/src/table/edit.js b/packages/block-library/src/table/edit.js index 22e756bdd450b..cccc2a3d3d5b3 100644 --- a/packages/block-library/src/table/edit.js +++ b/packages/block-library/src/table/edit.js @@ -12,7 +12,7 @@ import { BlockControls, RichText, BlockIcon, - AlignmentToolbar, + AlignmentControl, useBlockProps, __experimentalUseColorProps as useColorProps, __experimentalUseBorderProps as useBorderProps, @@ -20,13 +20,11 @@ import { import { __ } from '@wordpress/i18n'; import { Button, - DropdownMenu, PanelBody, Placeholder, TextControl, ToggleControl, - ToolbarGroup, - ToolbarItem, + ToolbarDropdownMenu, } from '@wordpress/components'; import { alignLeft, @@ -429,29 +427,26 @@ function TableEdit( { return (
{ ! isEmpty && ( - - - - { ( toggleProps ) => ( - - ) } - - - - onChangeColumnAlignment( nextAlign ) - } - /> - + <> + + + onChangeColumnAlignment( nextAlign ) + } + /> + + + + + ) } { ! isEmpty && ( diff --git a/packages/block-library/src/term-description/edit.js b/packages/block-library/src/term-description/edit.js index b4cc0a062c6df..c632a640b08c4 100644 --- a/packages/block-library/src/term-description/edit.js +++ b/packages/block-library/src/term-description/edit.js @@ -10,7 +10,7 @@ import { __ } from '@wordpress/i18n'; import { useBlockProps, BlockControls, - AlignmentToolbar, + AlignmentControl, } from '@wordpress/block-editor'; export default function TermDescriptionEdit( { @@ -27,8 +27,8 @@ export default function TermDescriptionEdit( { } ); return ( <> - - + { setAttributes( { textAlign: nextAlign } );