From fb00c390ebf5ae72bd797fb33bb0e15c5378c46f Mon Sep 17 00:00:00 2001 From: Mayank-Tripathi32 Date: Fri, 13 Dec 2024 16:45:56 +0530 Subject: [PATCH] feat: migrate to toolspanel --- .../block-library/src/social-link/edit.js | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/block-library/src/social-link/edit.js b/packages/block-library/src/social-link/edit.js index 91f1e4170b33d..43fb305d52ffa 100644 --- a/packages/block-library/src/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -22,10 +22,10 @@ import { useState, useRef } from '@wordpress/element'; import { Button, Dropdown, - PanelBody, - PanelRow, TextControl, ToolbarButton, + __experimentalToolsPanel as ToolsPanel, + __experimentalToolsPanelItem as ToolsPanelItem, __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper, } from '@wordpress/components'; import { useMergeRefs } from '@wordpress/compose'; @@ -195,8 +195,20 @@ const SocialLinkEdit = ( { ) } - - + { + setAttributes( { label: undefined } ); + } } + > + !! label } + onDeselect={ () => { + setAttributes( { label: undefined } ); + } } + > - - + +