From 2079032accd0e6dbb59c75601a3de81a8308d994 Mon Sep 17 00:00:00 2001 From: Dan Lemon Date: Thu, 23 Jan 2025 13:40:25 +0100 Subject: [PATCH] chore: if props.layout is undefined output as grid --- packages/drupal/gutenberg_blocks/js/blocks/teaser-list.tsx | 2 +- .../src/components/Organisms/PageContent/BlockTeaserList.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/drupal/gutenberg_blocks/js/blocks/teaser-list.tsx b/packages/drupal/gutenberg_blocks/js/blocks/teaser-list.tsx index 95bd870de..a7a4bc4b7 100644 --- a/packages/drupal/gutenberg_blocks/js/blocks/teaser-list.tsx +++ b/packages/drupal/gutenberg_blocks/js/blocks/teaser-list.tsx @@ -23,7 +23,7 @@ registerBlockType<{ attributes: { layout: { type: 'string', - default: 'GRID', + default: '', }, buttonText: { type: 'string', diff --git a/packages/ui/src/components/Organisms/PageContent/BlockTeaserList.tsx b/packages/ui/src/components/Organisms/PageContent/BlockTeaserList.tsx index dba957abd..0cb7d5297 100644 --- a/packages/ui/src/components/Organisms/PageContent/BlockTeaserList.tsx +++ b/packages/ui/src/components/Organisms/PageContent/BlockTeaserList.tsx @@ -32,7 +32,8 @@ export function BlockTeaserList(props: BlockTeaserListFragment) { return (
- {props.layout === BlockTeaserListLayout.Grid ? ( + {props.layout === undefined || + props.layout === BlockTeaserListLayout.Grid ? (
    {props.staticContent?.map((teaserItem) => { staticIds.push(getUUIDFromId(teaserItem?.content?.id || ''));