Skip to content

Commit

Permalink
feat(SLB-300): accordion schema
Browse files Browse the repository at this point in the history
  • Loading branch information
colorfield committed May 3, 2024
1 parent abec41f commit b6a65f4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/schema/src/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ union PageContent @resolveEditorBlockType =
| BlockCta
| BlockImageWithText
| BlockQuote
| BlockAccordion

type BlockForm @type(id: "custom/form") {
url: Url @resolveEditorBlockAttribute(key: "formId") @webformIdToUrl(id: "$")
Expand Down Expand Up @@ -245,6 +246,24 @@ type BlockImageTeaser @default @value {
ctaUrl: Url @resolveEditorBlockAttribute(key: "ctaUrl")
}

type BlockAccordion @type(id: "custom/accordion") {
items: [BlockAccordionItem]! @resolveEditorBlockChildren
}

interface BlockAccordionItemInterface {
title: String!
}

union BlockAccordionItem @resolveEditorBlockType = BlockAccordionItemText

type BlockAccordionItemText implements BlockAccordionItemInterface
@type(id: "custom/accordion-item-text") {
title: String! @resolveEditorBlockAttribute(key: "title")
icon: String! @resolveEditorBlockAttribute(key: "icon")
# @todo check if we want inner blocks here.
text: String! @resolveEditorBlockAttribute(key: "text")
}

type BlockCta @type(id: "custom/cta") {
url: Url @resolveEditorBlockAttribute(key: "url")
text: String @resolveEditorBlockAttribute(key: "text")
Expand Down

0 comments on commit b6a65f4

Please sign in to comment.