Skip to content
This repository was archived by the owner on May 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #46 from saiichihashimoto/image-description
Browse files Browse the repository at this point in the history
fix(image): allow title & description on images
  • Loading branch information
kodiakhq[bot] authored Jun 8, 2022
2 parents 1c421c1 + 01e2c48 commit 1ab403a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/image/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { faker } from "@faker-js/faker";
import { z } from "zod";

import type { FieldOptionKeys, FieldsType, InferFieldsZod } from "../fields";
import type { FieldsType, InferFieldsZod } from "../fields";
import type { SanityType, TypeValidation } from "../types";
import type { Faker } from "@faker-js/faker";
import type { Schema } from "@sanity/types";
@@ -52,7 +52,7 @@ interface ImageType<
Schema.ImageDefinition,
z.input<ZodImage<Hotspot, Fields>>
>,
FieldOptionKeys
"name"
>,
ZodImage<Hotspot, Fields>
> {}
@@ -63,7 +63,8 @@ export const image = <
>(
def: Omit<
TypeValidation<Schema.ImageDefinition, z.input<ZodImage<Hotspot, Fields>>>,
FieldOptionKeys | "fields" | "preview" | "type"
// "title" and "description" actually show up in the UI
"fields" | "name" | "preview" | "type"
> & {
fields?: Fields;
hotspot?: Hotspot;

0 comments on commit 1ab403a

Please sign in to comment.