Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions packages/block-editor/src/components/block-card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ import clsx from 'clsx';
import {
Button,
Icon,
__experimentalText as WCText,
__experimentalVStack as VStack,
__experimentalHStack as HStack,
privateApis as componentsPrivateApis,
} from '@wordpress/components';
import { Text, Stack } from '@wordpress/ui';
import { useDispatch, useSelect } from '@wordpress/data';
import deprecated from '@wordpress/deprecated';
import { __, sprintf, isRTL } from '@wordpress/i18n';
Expand Down Expand Up @@ -150,8 +148,8 @@ function BlockCard( {
className
) }
>
<VStack>
<HStack justify="flex-start" spacing={ 0 }>
<Stack direction="column">
<Stack direction="row" justify="flex-start" spacing={ 0 }>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing is not a valid prop for the Stack component, we should use the gap prop instead https://wordpress.github.io/gutenberg/?path=/docs/design-system-components-stack--docs

{ parentBlockClientId && (
<Button
onClick={ () => selectBlock( parentBlockClientId ) }
Expand Down Expand Up @@ -189,7 +187,7 @@ function BlockCard( {
}
>
<BlockIcon icon={ icon } showColors />
<VStack spacing={ 1 }>
<Stack direction="column" spacing={ 1 }>
<TitleElement className="block-editor-block-card__title">
<span className="block-editor-block-card__name">
{ !! name?.length ? name : title }
Expand All @@ -201,15 +199,15 @@ function BlockCard( {
) }
</TitleElement>
{ children }
</VStack>
</Stack>
</OptionalParentSelectButton>
</HStack>
</Stack>
{ ! parentClientId && ! isChild && description && (
<WCText className="block-editor-block-card__description">
<Text className="block-editor-block-card__description">
{ description }
</WCText>
</Text>
) }
</VStack>
</Stack>
</div>
);
}
Expand Down
5 changes: 0 additions & 5 deletions tools/eslint/suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
"count": 2
}
},
"packages/block-editor/src/components/block-card/index.js": {
"@wordpress/use-recommended-components": {
"count": 3
}
},
"packages/block-editor/src/components/block-inspector/edit-contents.js": {
"@wordpress/use-recommended-components": {
"count": 1
Expand Down
Loading