/** * WordPress dependencies */ import { InspectorControls } from '@safe-wordpress/block-editor'; import { PanelBody, ToggleControl } from '@safe-wordpress/components'; import { _x } from '@safe-wordpress/i18n'; import type { BlockEditProps } from '@safe-wordpress/blocks'; /** * Internal dependencies */ import type { Attributes } from './types'; const Inspector = ( props: BlockEditProps< Attributes > ): JSX.Element => { const { attributes, setAttributes } = props; const { required, isLabelHidden } = attributes; return ( <> { setAttributes( { required: value } ); } } /> { setAttributes( { isLabelHidden: value } ); } } /> ); }; export default Inspector;