UNPKG

@wordpress/block-editor

Version:
51 lines (46 loc) 1.23 kB
/** * WordPress dependencies */ import { PanelBody } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; /** * Internal dependencies */ import BlockStyles from '../block-styles'; import InspectorControls from '../inspector-controls'; import { useBorderPanelLabel } from '../../hooks/border'; const StylesTab = ( { blockName, clientId, hasBlockStyles } ) => { const borderPanelLabel = useBorderPanelLabel( { blockName } ); return ( <> { hasBlockStyles && ( <div> <PanelBody title={ __( 'Styles' ) }> <BlockStyles clientId={ clientId } /> </PanelBody> </div> ) } <InspectorControls.Slot group="color" label={ __( 'Color' ) } className="color-block-support-panel__inner-wrapper" /> <InspectorControls.Slot group="background" label={ __( 'Background image' ) } /> <InspectorControls.Slot group="filter" /> <InspectorControls.Slot group="typography" label={ __( 'Typography' ) } /> <InspectorControls.Slot group="dimensions" label={ __( 'Dimensions' ) } /> <InspectorControls.Slot group="border" label={ borderPanelLabel } /> <InspectorControls.Slot group="styles" /> </> ); }; export default StylesTab;