From 5984343aebc6beaac498cb32ca381db578bbe5c3 Mon Sep 17 00:00:00 2001 From: Bryant Gillespie Date: Tue, 23 Jul 2024 20:19:39 -0400 Subject: [PATCH] Pricing Page Edits (#159) * reverse badge colorway * block button option * [types] add badge for pricing tier * tighten tier group spacing * Update Tier component to include badge and tighten spacing * [types] hide_row in block table * Add tooltips for table * breakpoint fixes * whitelist support agent icon * padding adjustment * add cards option * types * cards optional * sticky headings for table * fix hover state for primary outline buttons * fix tier card text size * add x-large button size for pill style empahsis * fix tier group * fix tooltip display * smaller min-height for tier * update table * cardgroup grid cols change --- components/Base/Badge.vue | 7 +- components/Base/Button.vue | 32 ++++- components/Base/CardGroup.vue | 2 +- components/Base/Icon.vue | 1 + components/Block/Table.vue | 119 +++++++++++++----- components/Block/Tier.vue | 185 +++++++++++++++++++++++----- components/Block/TierGroup.vue | 21 +++- types/schema/blocks/block-button.ts | 2 +- types/schema/blocks/block-table.ts | 7 +- types/schema/blocks/block-tier.ts | 10 ++ 10 files changed, 314 insertions(+), 72 deletions(-) diff --git a/components/Base/Badge.vue b/components/Base/Badge.vue index 96e8ae26..6f112aec 100644 --- a/components/Base/Badge.vue +++ b/components/Base/Badge.vue @@ -1,6 +1,6 @@ diff --git a/components/Block/Tier.vue b/components/Block/Tier.vue index 28d8fccd..dbf161ac 100644 --- a/components/Block/Tier.vue +++ b/components/Block/Tier.vue @@ -8,41 +8,103 @@ const props = defineProps(); const { data: block } = useAsyncData(props.uuid, () => $directus.request( $readItem('block_tier', props.uuid, { - fields: ['name', 'subtext', 'price', 'term', 'term_tooltip', 'cta', 'description', 'points', 'highlight'], + fields: [ + 'name', + 'subtext', + 'price', + 'term', + 'term_tooltip', + 'cta', + 'description', + 'points', + 'highlight', + 'badge', + 'tier_type', + 'cards', + ], }), ), ); diff --git a/components/Block/TierGroup.vue b/components/Block/TierGroup.vue index 0f3669da..e485f03e 100644 --- a/components/Block/TierGroup.vue +++ b/components/Block/TierGroup.vue @@ -22,10 +22,21 @@ const { data: block } = useAsyncData(props.uuid, () => diff --git a/types/schema/blocks/block-button.ts b/types/schema/blocks/block-button.ts index b4c9cc94..f0771da1 100644 --- a/types/schema/blocks/block-button.ts +++ b/types/schema/blocks/block-button.ts @@ -12,5 +12,5 @@ export interface BlockButton { resource: string | Resource | null; external_url: string | null; icon: string | null; - size: 'small' | 'medium' | 'large'; + size: 'small' | 'medium' | 'large' | 'x-large'; } diff --git a/types/schema/blocks/block-table.ts b/types/schema/blocks/block-table.ts index f8e6e8b5..818f140a 100644 --- a/types/schema/blocks/block-table.ts +++ b/types/schema/blocks/block-table.ts @@ -2,5 +2,10 @@ export interface BlockTable { id: string; title: string; columns: { label: string }[]; - rows: { name: string; tooltip: string; cols: { value: string; tooltip: string }[] }[]; + rows: { + name: string; + tooltip: string; + cols: { value: string; tooltip: string }[]; + hide_row: boolean; + }[]; } diff --git a/types/schema/blocks/block-tier.ts b/types/schema/blocks/block-tier.ts index 4065c588..16ea8347 100644 --- a/types/schema/blocks/block-tier.ts +++ b/types/schema/blocks/block-tier.ts @@ -3,6 +3,7 @@ import type { BlockButton } from './block-button'; export interface BlockTier { id: string; name: string; + badge: string | null; subtext: string | null; price: string; term: string | null; @@ -11,4 +12,13 @@ export interface BlockTier { cta: string | BlockButton | null; points: null | { content: string }[]; highlight: boolean; + tier_type: 'standard' | 'full_width'; + cards?: { + badge: string | null | undefined; + title: string | null | undefined; + icon: string | null | undefined; + description: string | null | undefined; + button_url: string | null | undefined; + button_label: string | null | undefined; + }[]; }