Skip to content

Commit

Permalink
🔥 Remove unused desktopLinkBig
Browse files Browse the repository at this point in the history
  • Loading branch information
petterhh committed Dec 9, 2024
1 parent f0e0f60 commit 0f657c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 63 deletions.
3 changes: 0 additions & 3 deletions src/components/text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export type TextType =
| "h5"
| "h6"
| "desktopLink"
| "desktopLinkBig"
| "labelRegular"
| "labelLarge"
| "quoteItalic"
Expand All @@ -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",
Expand All @@ -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,
Expand Down
33 changes: 1 addition & 32 deletions src/components/text/text.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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%;
Expand All @@ -132,6 +100,7 @@
line-height: 133.333%;

@media (max-width: 425px) {
font-size: 1.125rem;
line-height: 120%;
}
}
Expand Down
39 changes: 11 additions & 28 deletions studio/schemas/objects/sections/logoSalad.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand All @@ -12,52 +11,36 @@ 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) =>
rule
.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",
};
},
},
Expand Down

0 comments on commit 0f657c8

Please sign in to comment.