Skip to content

Commit

Permalink
feat(slb-306): exposing the CTA block
Browse files Browse the repository at this point in the history
  • Loading branch information
elistone committed May 9, 2024
1 parent 1bbc39e commit 675d028
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/schema/src/fragments/PageContent/BlockInfoGrid.gql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ fragment BlockInfoGrid on BlockInfoGrid {

fragment BlockInfoGridItem on BlockInfoGridItem {
icon
cta {
...BlockCta
}
textContent {
markup
}
Expand Down
1 change: 1 addition & 0 deletions packages/schema/src/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ type BlockInfoGrid @type(id: "custom/info-grid") {
type BlockInfoGridItem @default @value {
icon: String! @resolveEditorBlockAttribute(key: "icon")
textContent: BlockMarkup @resolveEditorBlockChildren @seek(pos: 0)
cta: BlockCta @resolveEditorBlockChildren @seek(pos: 1)
}

input PaginationInput {
Expand Down
10 changes: 10 additions & 0 deletions packages/ui/src/components/Organisms/PageDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,17 @@ export function PageDisplay(page: PageFragment) {
<div key={index}>
<p>Icon: {item?.icon}</p>
<p>Markup: {item?.textContent?.markup}</p>
<p>CTA Url: {item?.cta?.url}</p>
<p>CTA Icon: {item?.cta?.icon}</p>
<p>
CTA Icon Position: {item?.cta?.iconPosition}
</p>
<p>CTA Text: {item?.cta?.text}</p>
<p>
CTA Open in New Tab: {item?.cta?.openInNewTab}
</p>
</div>
<br />
</>
);
})}
Expand Down

0 comments on commit 675d028

Please sign in to comment.