Skip to content

Commit

Permalink
chore: if props.layout is undefined output as grid
Browse files Browse the repository at this point in the history
  • Loading branch information
dan2k3k4 committed Jan 23, 2025
1 parent 99aa20b commit 2079032
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/drupal/gutenberg_blocks/js/blocks/teaser-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ registerBlockType<{
attributes: {
layout: {
type: 'string',
default: 'GRID',
default: '',
},
buttonText: {
type: 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export function BlockTeaserList(props: BlockTeaserListFragment) {
return (
<div className="bg-white px-6 py-12 lg:px-8">
<div className="mx-auto max-w-6xl">
{props.layout === BlockTeaserListLayout.Grid ? (
{props.layout === undefined ||
props.layout === BlockTeaserListLayout.Grid ? (
<ul className="my-8 grid grid-cols-subgrid gap-4 md:grid-cols-2 lg:grid-cols-3 lg:gap-8">
{props.staticContent?.map((teaserItem) => {
staticIds.push(getUUIDFromId(teaserItem?.content?.id || ''));
Expand Down

0 comments on commit 2079032

Please sign in to comment.