From 054a6b573cf264d3101135460745f3696fd02431 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 23 Jul 2020 14:23:07 +0300 Subject: [PATCH] Lint fix and comment --- .../components/inspector-controls/index.native.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/block-editor/src/components/inspector-controls/index.native.js b/packages/block-editor/src/components/inspector-controls/index.native.js index a2be9b7e29b3dd..c8b4b9f7b004db 100644 --- a/packages/block-editor/src/components/inspector-controls/index.native.js +++ b/packages/block-editor/src/components/inspector-controls/index.native.js @@ -19,10 +19,9 @@ const { Fill, Slot } = createSlotFill( 'InspectorControls' ); * Adds the block settings button when the inspector control has children * * In some cases we don't want to show the block settings button - * even if the the inspector controls have children. We can exclude - * those childen by passing the 'excludeFromSettings' prop - * (e.g. The color picker control of the Cover block is triggered - * by a separate swatch button) + * even if the the inspector controls have children. In such cased we can pass + * the 'hideBlockSettingsButton' prop (e.g. The color picker control of the + * Cover block is triggered by a separate swatch button) * */ const FillWithSettingsButton = ( { children, ...props } ) => { const { isSelected } = useBlockEditContext(); @@ -39,7 +38,10 @@ const FillWithSettingsButton = ( { children, ...props } ) => { } - { ! props.hideBlockSettingsButton && React.Children.count( children ) > 0 && } + { ! props.hideBlockSettingsButton && + React.Children.count( children ) > 0 && ( + + ) } ); };