diff --git a/packages/iconography/src/AddReactionOutlined.svg b/packages/iconography/src/Icon.svg similarity index 100% rename from packages/iconography/src/AddReactionOutlined.svg rename to packages/iconography/src/Icon.svg diff --git a/packages/iconography/src/block/Edit.tsx b/packages/iconography/src/block/Edit.tsx index 68b1ded..254de1a 100644 --- a/packages/iconography/src/block/Edit.tsx +++ b/packages/iconography/src/block/Edit.tsx @@ -1,26 +1,15 @@ import React from 'react'; /* WordPress Dependencies */ -import { - BlockControls, - InspectorControls, - useBlockProps, -} from '@wordpress/block-editor'; +import { useBlockProps } from '@wordpress/block-editor'; import { store as RichTextStore } from '@wordpress/rich-text'; import { useSelect } from '@wordpress/data'; -import { useState } from '@wordpress/element'; -import { - Button, - Panel, - PanelBody, - ToolbarButton, - Icon, -} from '@wordpress/components'; +import { Icon, Spinner } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { replace } from '@wordpress/icons'; /* Internal deps */ -import { IconModal } from '../IconModal'; +import { IconToolbarButton } from '../shared'; import './style.scss'; /* Types */ @@ -33,7 +22,6 @@ export const Edit = ( { attributes, setAttributes, }: BlockEditProps< Attributes > ) => { - const [ showIconModal, setShowIconModal ] = useState( false ); const blockProps = useBlockProps(); const { getFormatType } = useSelect( ( select ) => @@ -61,55 +49,27 @@ export const Edit = ( { const TagName = ( attributes.iconTag as keyof HTMLElementTagNameMap ) ?? 'span'; - const buttonText = attributes.iconContent - ? __( 'Change Icon', 'boxuk' ) - : __( 'Select Icon', 'boxuk' ); - - const ShowModalButton = () => ( -