@@ -12,10 +12,8 @@ import {
1212 BlockControls ,
1313 InspectorControls ,
1414 useSettings ,
15- store as blockEditorStore ,
1615} from '@wordpress/block-editor' ;
1716import { formatLtr } from '@wordpress/icons' ;
18- import { useSelect } from '@wordpress/data' ;
1917import { pure } from '@wordpress/compose' ;
2018
2119function ParagraphRTLControl ( { direction, setDirection } ) {
@@ -37,16 +35,9 @@ export function hasDropCapDisabled( align ) {
3735 return align === ( isRTL ( ) ? 'left' : 'right' ) || align === 'center' ;
3836}
3937
40- function Controls ( { clientId, setAttributes } ) {
38+ function Controls ( { align , direction , dropCap , clientId, setAttributes } ) {
4139 const [ isDropCapFeatureEnabled ] = useSettings ( 'typography.dropCap' ) ;
4240
43- function selector ( select ) {
44- const { align, direction, dropCap } =
45- select ( blockEditorStore ) . getBlockAttributes ( clientId ) || { } ;
46- return { align, direction, dropCap } ;
47- }
48- const { align, direction, dropCap } = useSelect ( selector , [ clientId ] ) ;
49-
5041 let helpText ;
5142 if ( hasDropCapDisabled ( align ) ) {
5243 helpText = __ ( 'Not available for aligned text.' ) ;
0 commit comments