From 18b7d74f6a92c7f685473a7bb0ad2db3980071bd Mon Sep 17 00:00:00 2001 From: Huub <50170696+huubl@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:34:19 +0200 Subject: [PATCH] Revert "updates LayoutTypeSwitcher to use ToggleGroupControl (#65498)" This reverts commit 1c34398fab8017d755e630f57625c56da90fb275. --- packages/block-editor/src/hooks/layout.js | 29 ++++++++++------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/packages/block-editor/src/hooks/layout.js b/packages/block-editor/src/hooks/layout.js index 54a376a0c6a4f..22d916d7b791b 100644 --- a/packages/block-editor/src/hooks/layout.js +++ b/packages/block-editor/src/hooks/layout.js @@ -11,8 +11,8 @@ import { addFilter } from '@wordpress/hooks'; import { getBlockSupport, hasBlockSupport } from '@wordpress/blocks'; import { useSelect } from '@wordpress/data'; import { - __experimentalToggleGroupControl as ToggleGroupControl, - __experimentalToggleGroupControlOption as ToggleGroupControlOption, + Button, + ButtonGroup, ToggleControl, PanelBody, privateApis as componentsPrivateApis, @@ -315,26 +315,21 @@ export default { function LayoutTypeSwitcher( { type, onChange } ) { return ( - + { getLayoutTypes().map( ( { name, label } ) => { return ( - + isPressed={ type === name } + onClick={ () => onChange( name ) } + > + { label } + ); } ) } - + ); }