From 0f657c80ae94554f3708d6ddb551010addf6aa68 Mon Sep 17 00:00:00 2001 From: Petter Hohle Date: Mon, 9 Dec 2024 15:18:49 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20unused=20desktopLinkBig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/text/Text.tsx | 3 -- src/components/text/text.module.css | 33 +---------------- studio/schemas/objects/sections/logoSalad.ts | 39 ++++++-------------- 3 files changed, 12 insertions(+), 63 deletions(-) diff --git a/src/components/text/Text.tsx b/src/components/text/Text.tsx index 06ceeb694..b52c244e8 100644 --- a/src/components/text/Text.tsx +++ b/src/components/text/Text.tsx @@ -8,7 +8,6 @@ export type TextType = | "h5" | "h6" | "desktopLink" - | "desktopLinkBig" | "labelRegular" | "labelLarge" | "quoteItalic" @@ -29,7 +28,6 @@ const elementMap: { [key in TextType]: keyof JSX.IntrinsicElements } = { h5: "h5", h6: "h6", desktopLink: "p", - desktopLinkBig: "p", labelRegular: "span", labelLarge: "span", quoteItalic: "p", @@ -51,7 +49,6 @@ const classMap: { [key in TextType]?: string } = { h5: styles.h5, h6: styles.h6, desktopLink: styles.desktopLink, - desktopLinkBig: styles.desktopLinkBig, labelRegular: styles.labelRegular, labelLarge: styles.labelLarge, quoteItalic: styles.quoteItalic, diff --git a/src/components/text/text.module.css b/src/components/text/text.module.css index 29dc3bf23..866e0c2f8 100644 --- a/src/components/text/text.module.css +++ b/src/components/text/text.module.css @@ -78,34 +78,7 @@ font-style: normal; font-weight: 400; line-height: 150%; - - @media (max-width: 834px) { - font-size: 2.5rem; - line-height: 120%; - } - - @media (max-width: 425px) { - font-size: 2rem; - line-height: 125%; - } -} - -.desktopLinkBig { - font-size: 1.25rem; - font-style: normal; - font-weight: 300; - line-height: 120%; text-decoration-line: underline; - - @media (max-width: 834px) { - font-size: 2.5rem; - line-height: 120%; - } - - @media (max-width: 425px) { - font-size: 2rem; - line-height: 125%; - } } .bodyXl { @@ -114,11 +87,6 @@ line-height: 120%; letter-spacing: 0.025rem; - @media (max-width: 834px) { - font-size: 2.5rem; - line-height: 120%; - } - @media (max-width: 425px) { font-size: 2rem; line-height: 125%; @@ -132,6 +100,7 @@ line-height: 133.333%; @media (max-width: 425px) { + font-size: 1.125rem; line-height: 120%; } } diff --git a/studio/schemas/objects/sections/logoSalad.ts b/studio/schemas/objects/sections/logoSalad.ts index 388c5c280..6d703ee60 100644 --- a/studio/schemas/objects/sections/logoSalad.ts +++ b/studio/schemas/objects/sections/logoSalad.ts @@ -1,8 +1,7 @@ -import { StringInputProps, defineField } from "sanity"; +import { defineField } from "sanity"; -import { StringInputWithCharacterCount } from "studio/components/stringInputWithCharacterCount/StringInputWithCharacterCount"; import image from "studio/schemas/fields/media"; -import { richText } from "studio/schemas/fields/text"; +import { titleID } from "studio/schemas/fields/text"; export const logoSaladID = "logoSalad"; @@ -12,31 +11,17 @@ export const logoSalad = defineField({ type: "object", fields: [ { - ...richText, - title: "Introduction", + name: titleID.basic, + type: "internationalizedArrayString", + title: "Logo salad title", description: - "Optional content displayed at the top of the section in a larger body text style. Use it to introduce the section and provide key information.", - }, - { - name: "supporting", - title: "Logo Description", - type: "string", - description: - "Required text displayed in a smaller body text style. Use it to provide additional context or details about the logos.", - validation: (rule) => [ - rule.required().error("Logo description is required."), - rule.max(100), - ], - components: { - input: (props: StringInputProps) => - StringInputWithCharacterCount({ ...props, maxCount: 100 }), - }, + "Enter the primary title that will be displayed at the top of the customer cases page. This is what users will see when they visit the page.", }, { name: "logos", - title: "List of Logos", + title: "Logos", description: - "Add a list of logos to display. You must include between 6 and 12 logos.", + "Add the logos you want to display. You must include between 6 and 12 logos.", type: "array", of: [image], validation: (rule) => @@ -44,20 +29,18 @@ export const logoSalad = defineField({ .min(6) .error("At least 6 logos are required.") .max(12) - .error("You can add up to 12 logos.") + .error("You can add up to 18 logos.") .required() .error("The list of logos is required."), }, ], preview: { select: { - title: "supporting", + title: titleID.basic, }, - prepare(selection) { - const { title } = selection; + prepare({ title }) { return { title: title, - subtitle: "Logo Salad", }; }, },