Gwk-Cultural-Park/schemas/author.ts
2024-09-07 08:40:25 +07:00

25 lines
537 B
TypeScript

import { IoPersonOutline } from 'react-icons/io5'
import { defineField, defineType } from 'sanity'
export default defineType({
name: 'author',
title: 'Author',
icon: IoPersonOutline,
type: 'document',
fields: [
defineField({
name: 'name',
title: 'Name',
type: 'string',
validation: (rule) => rule.required(),
}),
defineField({
name: 'picture',
title: 'Picture',
type: 'image',
options: { hotspot: true },
validation: (rule) => rule.required(),
}),
],
})