Skip to content

Commit

Permalink
V3 - Add icons to shared studio (#870)
Browse files Browse the repository at this point in the history
  • Loading branch information
idamand authored Nov 7, 2024
1 parent 0e67cd8 commit 616b07c
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions studioShared/deskStructure.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ProjectsIcon } from "@sanity/icons";
import { StructureResolver } from "sanity/structure";

import { customerCaseID } from "./schemas/documents/customerCase";
Expand All @@ -8,5 +9,6 @@ export const deskStructure: StructureResolver = (S) =>
.items([
S.listItem()
.title("Customer cases")
.icon(ProjectsIcon)
.child(S.documentTypeList(customerCaseID).title("Customer cases")),
]);
2 changes: 2 additions & 0 deletions studioShared/schemas/documents/customerCase.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { DocumentTextIcon } from "@sanity/icons";
import { groq } from "next-sanity";
import { Reference, defineField, defineType } from "sanity";

Expand Down Expand Up @@ -26,6 +27,7 @@ const customerCase = defineType({
name: customerCaseID,
type: "document",
title: "Customer Case",
icon: DocumentTextIcon,
fields: [
defineField({
...titleSlug,
Expand Down
2 changes: 2 additions & 0 deletions studioShared/schemas/fields/customerCaseProjectInfo.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { UlistIcon } from "@sanity/icons";
import { defineField } from "sanity";

import { isInternationalizedString } from "studio/lib/interfaces/global";
Expand Down Expand Up @@ -40,6 +41,7 @@ export const customerCaseProjectInfo = defineField({
type: "object",
title: "List Item",
name: "listItem",
icon: UlistIcon,
fields: [
{
name: "delivery",
Expand Down
2 changes: 2 additions & 0 deletions studioShared/schemas/objects/emptySection.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SquareIcon } from "@sanity/icons";
import { defineField } from "sanity";

import EmptySectionInput from "studioShared/components/EmptySectionInput";
Expand All @@ -7,6 +8,7 @@ const emptySection = defineField({
title: "Blank Space",
description: "Displays as blank space on the page.",
type: "object",
icon: SquareIcon,
fields: [
{
name: "placeholder",
Expand Down
2 changes: 2 additions & 0 deletions studioShared/schemas/objects/imageBlock.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ImageIcon } from "@sanity/icons";
import { defineField } from "sanity";

import { isInternationalizedString } from "studio/lib/interfaces/global";
Expand All @@ -8,6 +9,7 @@ const imageBlock = defineField({
name: "imageBlock",
title: "Image Block",
type: "object",
icon: ImageIcon,
fields: [
{
title: "Image",
Expand Down
3 changes: 3 additions & 0 deletions studioShared/schemas/objects/listBlock.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { TagIcon, TagsIcon } from "@sanity/icons";
import { defineField } from "sanity";

import { isInternationalizedString } from "studio/lib/interfaces/global";
import { firstTranslation } from "studio/utils/i18n";
const listBlock = defineField({
name: "listBlock",
title: "List Block",
icon: TagsIcon,
description:
"This block could be used to add a list of skills, tools, methods etc. used for this project.",
type: "object",
Expand All @@ -27,6 +29,7 @@ const listBlock = defineField({
type: "object",
title: "List Item",
name: "listItem",
icon: TagIcon,
fields: [
{
name: "text",
Expand Down
2 changes: 2 additions & 0 deletions studioShared/schemas/objects/quoteBlock.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { CommentIcon } from "@sanity/icons";
import { defineField } from "sanity";

import { firstTranslation } from "studio/utils/i18n";
Expand All @@ -6,6 +7,7 @@ const quoteBlock = defineField({
name: "quoteBlock",
type: "object",
title: "Quote Block",
icon: CommentIcon,
fields: [
{
name: "quote",
Expand Down
3 changes: 3 additions & 0 deletions studioShared/schemas/objects/resultsBlock.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BarChartIcon, ChartUpwardIcon } from "@sanity/icons";
import { defineField } from "sanity";

import { isInternationalizedString } from "studio/lib/interfaces/global";
Expand All @@ -7,6 +8,7 @@ const resultsBlock = defineField({
name: "resultsBlock",
type: "object",
title: "Results Block",
icon: ChartUpwardIcon,
description: "This block can be used to add some results from the project.",
fields: [
{
Expand All @@ -28,6 +30,7 @@ const resultsBlock = defineField({
type: "object",
title: "Result List Item",
name: "resultlistitem",
icon: BarChartIcon,
fields: [
{
name: "result",
Expand Down
2 changes: 2 additions & 0 deletions studioShared/schemas/objects/splitSection.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { InlineIcon } from "@sanity/icons";
import { defineField } from "sanity";

import { humanizeCamelCase } from "studio/utils/stringUtils";
Expand All @@ -11,6 +12,7 @@ export const splitSectionSections = [...baseCustomerCaseSections, emptySection];
const splitSection = defineField({
name: "splitSection",
title: "Split Section",
icon: InlineIcon,
description: "Section containing two other sections, displayed side-by-side",
type: "object",
fields: [
Expand Down
2 changes: 2 additions & 0 deletions studioShared/schemas/objects/textBlock.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BlockContentIcon } from "@sanity/icons";
import { defineField } from "sanity";

import { firstTranslation } from "studio/utils/i18n";
Expand All @@ -6,6 +7,7 @@ const textBlock = defineField({
name: "textBlock",
title: "Text Block",
type: "object",
icon: BlockContentIcon,
fields: [
{
name: "sectionTitle",
Expand Down

0 comments on commit 616b07c

Please sign in to comment.