Skip to content

Commit

Permalink
feat(SLB-296): organism placeholder for quote blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
chindris committed Apr 16, 2024
1 parent c2fdea6 commit e781dd4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/schema/src/fragments/Page.gql
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ fragment Page on Page {
...BlockMedia
...BlockForm
...BlockImageTeasers
...BlockQuote
}
metaTags {
tag
Expand Down
9 changes: 9 additions & 0 deletions packages/schema/src/fragments/PageContent/BlockQuote.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
fragment BlockQuote on BlockQuote {
text
author
role
image {
source(width: 1536, sizes: [[768, 768], [1536, 1536]])
alt
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { BlockQuoteFragment } from '@custom/schema';
import React from 'react';

export function BlockQuote(props: BlockQuoteFragment) {
console.log('Block quote props:', props);
return <></>;
}
3 changes: 3 additions & 0 deletions packages/ui/src/components/Organisms/PageDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { PageTransition } from '../Molecules/PageTransition';
import { BlockForm } from './PageContent/BlockForm';
import { BlockMarkup } from './PageContent/BlockMarkup';
import { BlockMedia } from './PageContent/BlockMedia';
import { BlockQuote } from './PageContent/BlockQuote';
import { PageHero } from './PageHero';

export function PageDisplay(page: PageFragment) {
Expand Down Expand Up @@ -40,6 +41,8 @@ export function PageDisplay(page: PageFragment) {
BlockImageTeasers goes here
</div>
);
case 'BlockQuote':
return <BlockQuote key={index} {...block} />;
default:
throw new UnreachableCaseError(block);
}
Expand Down

0 comments on commit e781dd4

Please sign in to comment.