diff --git a/packages/ui/src/components/Atoms/Container.css b/packages/ui/src/components/Atoms/Container.css index 46e07f9bb..9e228c04d 100644 --- a/packages/ui/src/components/Atoms/Container.css +++ b/packages/ui/src/components/Atoms/Container.css @@ -48,4 +48,8 @@ a { @apply my-2; } + p, + a { + @apply text-base; + } } diff --git a/packages/ui/src/components/Organisms/PageContent/BlockInfoGrid.tsx b/packages/ui/src/components/Organisms/PageContent/BlockInfoGrid.tsx index 0ede0e35e..fd023c09d 100644 --- a/packages/ui/src/components/Organisms/PageContent/BlockInfoGrid.tsx +++ b/packages/ui/src/components/Organisms/PageContent/BlockInfoGrid.tsx @@ -1,43 +1,42 @@ import { BlockInfoGridFragment, InfoGridIcon } from '@custom/schema'; import React from 'react'; +import { isTruthy } from '../../../utils/isTruthy'; import { BlockCta } from './BlockCta'; import { BlockMarkup } from './BlockMarkup'; export function BlockInfoGrid(props: BlockInfoGridFragment) { return ( -
+
{props.gridItems.map((item, index) => (
{item?.icon && iconMap[item?.icon]}
- {item?.infoGridContent && - item?.infoGridContent.map((content, contentIndex) => ( -
-
- {content?.__typename && - content?.__typename === 'BlockMarkup' && ( - - )} -
- -
- {content?.__typename && - content?.__typename === 'BlockCta' && ( - - )} -
-
- ))} + {item?.infoGridContent?.filter(isTruthy).map((block, index) => { + switch (block?.__typename) { + case 'BlockCta': + return ( +
+ +
+ ); + case 'BlockMarkup': + return ( +
+ +
+ ); + } + })}
))}