feat(SW-217): Split up Card to two (Card and TeaserCard)

This commit is contained in:
Pontus Dreij
2024-09-26 11:07:03 +02:00
parent 6a85cfd19c
commit bb93bdf69c
11 changed files with 200 additions and 59 deletions

View File

@@ -9,9 +9,7 @@ fragment CardBlock on Card {
body_text
has_primary_button
has_secondary_button
has_sidepeek_button
heading
is_content_card
scripted_top_title
title
primary_button {
@@ -52,9 +50,6 @@ fragment CardBlock on Card {
}
}
}
sidepeek_button {
call_to_action_text
}
system {
...System
}

View File

@@ -1,8 +1,10 @@
#import "./Card.graphql"
#import "./LoyaltyCard.graphql"
#import "./TeaserCard.graphql"
#import "./Refs/Card.graphql"
#import "./Refs/LoyaltyCard.graphql"
#import "./Refs/TeaserCard.graphql"
fragment CardsGrid_ContentPage on ContentPageBlocksCardsGrid {
cards_grid {
layout
@@ -15,6 +17,7 @@ fragment CardsGrid_ContentPage on ContentPageBlocksCardsGrid {
__typename
...CardBlock
...LoyaltyCardBlock
...TeaserCardBlock
}
}
}
@@ -29,6 +32,7 @@ fragment CardsGrid_ContentPageRefs on ContentPageBlocksCardsGrid {
__typename
...CardBlockRef
...LoyaltyCardBlockRef
...TeaserCardBlockRef
}
}
}

View File

@@ -0,0 +1,36 @@
#import "../../AccountPage/Ref.graphql"
#import "../../ContentPage/Ref.graphql"
#import "../../LoyaltyPage/Ref.graphql"
#import "../../HotelPage/Ref.graphql"
fragment TeaserCardBlockRef on TeaserCard {
secondary_button {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...ContentPageRef
...LoyaltyPageRef
...HotelPageRef
}
}
}
}
primary_button {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...ContentPageRef
...LoyaltyPageRef
...HotelPageRef
}
}
}
}
system {
...System
}
}

View File

@@ -0,0 +1,61 @@
#import "../System.graphql"
#import "../PageLink/AccountPageLink.graphql"
#import "../PageLink/ContentPageLink.graphql"
#import "../PageLink/LoyaltyPageLink.graphql"
#import "../PageLink/HotelPageLink.graphql"
fragment TeaserCardBlock on TeaserCard {
heading
body_text
image
title
has_primary_button
has_secondary_button
has_sidepeek_button
primary_button {
is_contentstack_link
cta_text
open_in_new_tab
external_link {
title
href
}
linkConnection {
edges {
node {
__typename
...LoyaltyPageLink
...ContentPageLink
...AccountPageLink
}
}
}
}
secondary_button {
is_contentstack_link
cta_text
open_in_new_tab
external_link {
title
href
}
linkConnection {
edges {
node {
__typename
...LoyaltyPageLink
...ContentPageLink
...AccountPageLink
...HotelPageLink
}
}
}
}
sidepeek_button {
call_to_action_text
}
system {
...System
}
}