Skip to content

Commit

Permalink
👌 Add field validations and remove padding
Browse files Browse the repository at this point in the history
  • Loading branch information
petterhh committed Dec 12, 2024
1 parent d072f5d commit de57e5f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/components/sections/openness/openness.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
justify-content: center;
align-items: flex-start;
max-width: var(--max-content-width-large);
padding: 0 2rem;
margin: 5rem auto;
gap: 2rem;
color: var(--text-primary);
Expand Down
4 changes: 1 addition & 3 deletions src/components/tag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ function getBackgroundClass(backgroundColor: string) {
switch (backgroundColor) {
case "light":
return "";
case "transparent":
return "";
case "dark":
return styles["tag--bgDark"];
case "violet":
Expand All @@ -31,7 +29,7 @@ function getBackgroundClass(backgroundColor: string) {

type TagProps = {
active?: boolean;
background?: "light" | "dark" | "violet" | "transparent";
background?: "light" | "dark" | "violet";
text: string;
} & TagInner;

Expand Down
3 changes: 3 additions & 0 deletions studio/schemas/objects/sections/openness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const opennessSection = defineField({
description:
"Enter the primary title that will be displayed at the top of the section.",
type: "internationalizedArrayString",
validation: (rule) => rule.required(),
},
{
name: "image",
Expand All @@ -23,13 +24,15 @@ export const opennessSection = defineField({
options: {
hotspot: true,
},
validation: (rule) => rule.required(),
},
{
name: "description",
title: "Description",
description:
"Enter the description that will be displayed in the smiley block.",
type: "internationalizedArrayString",
validation: (rule) => rule.required(),
},
],
preview: {
Expand Down

0 comments on commit de57e5f

Please sign in to comment.