From a3c802fa56eeb35a1c530d227267bbee397739cf Mon Sep 17 00:00:00 2001 From: Mathias Oterhals Myklebust Date: Thu, 19 Sep 2024 10:42:37 +0200 Subject: [PATCH] feat: remove theme option for Callout and CallToAction --- .../sections/callToAction/CallToAction.tsx | 5 +---- .../sections/callToAction/callToAction.module.css | 9 +-------- src/components/sections/callout/Callout.tsx | 3 +-- src/components/sections/callout/callout.module.css | 7 ------- studio/lib/interfaces/pages.ts | 4 ---- studio/schemas/fields/theme.ts | 14 -------------- studio/schemas/objects/sections/callToAction.ts | 2 -- studio/schemas/objects/sections/callout.ts | 3 +-- 8 files changed, 4 insertions(+), 43 deletions(-) delete mode 100644 studio/schemas/fields/theme.ts diff --git a/src/components/sections/callToAction/CallToAction.tsx b/src/components/sections/callToAction/CallToAction.tsx index e49544450..d68e5de9d 100644 --- a/src/components/sections/callToAction/CallToAction.tsx +++ b/src/components/sections/callToAction/CallToAction.tsx @@ -9,11 +9,8 @@ interface CallToActionProps { } const CallToAction = ({ callToAction }: CallToActionProps) => { - const theme = - callToAction.theme === "primary" ? styles.primary : styles.secondary; - return ( -
+
{callToAction?.basicTitle}
    {callToAction?.callToActions?.map((cta, index) => ( diff --git a/src/components/sections/callToAction/callToAction.module.css b/src/components/sections/callToAction/callToAction.module.css index ddabec08d..de1c1f15a 100644 --- a/src/components/sections/callToAction/callToAction.module.css +++ b/src/components/sections/callToAction/callToAction.module.css @@ -1,11 +1,3 @@ -.primary { - background: var(--secondary-gradient-pink); -} - -.secondary { - background-color: var(--secondary-yellow-1); -} - .article { display: flex; flex-direction: column; @@ -13,6 +5,7 @@ text-align: center; gap: 1.5rem; padding: 5rem 2rem; + background: var(--secondary-gradient-pink); @media (min-width: 640px) { padding: 5rem 3rem; diff --git a/src/components/sections/callout/Callout.tsx b/src/components/sections/callout/Callout.tsx index 850660211..98355f8a4 100644 --- a/src/components/sections/callout/Callout.tsx +++ b/src/components/sections/callout/Callout.tsx @@ -15,10 +15,9 @@ const myPortableTextComponents: Partial = { }; const Callout = ({ callout }: CalloutProps) => { - const theme = callout.theme == "primary" ? styles.primary : styles.secondary; return ( callout.richText && ( -
    +