adding sanity components
This commit is contained in:
20
schemas/documents/categories.ts
Normal file
20
schemas/documents/categories.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { defineField, defineType } from 'sanity';
|
||||
|
||||
export const categories = defineType({
|
||||
name: 'categories',
|
||||
title: 'Categories',
|
||||
type: 'document',
|
||||
fields: [
|
||||
defineField({
|
||||
name: 'name',
|
||||
title: 'Name',
|
||||
type: 'string',
|
||||
validation: Rule => Rule.required()
|
||||
}),
|
||||
defineField({
|
||||
name: 'description',
|
||||
title: 'Description',
|
||||
type: 'text'
|
||||
}),
|
||||
],
|
||||
})
|
||||
Reference in New Issue
Block a user