adding sanity components
This commit is contained in:
33
schemas/objects/feobj/newsData.ts
Normal file
33
schemas/objects/feobj/newsData.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { defineField, defineType } from 'sanity';
|
||||
|
||||
export const newsData = defineType({
|
||||
name: 'newsData',
|
||||
title: 'News',
|
||||
type: 'object',
|
||||
fields: [
|
||||
defineField({
|
||||
name: 'nav',
|
||||
title: 'Navigation',
|
||||
type: 'array',
|
||||
of: [
|
||||
{type: 'string'}
|
||||
]
|
||||
}),
|
||||
defineField({
|
||||
name: 'posts',
|
||||
title: 'Posts',
|
||||
type: 'array',
|
||||
of: [
|
||||
{
|
||||
type: 'reference',
|
||||
to: [
|
||||
{type: 'newsPost'}
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
],
|
||||
options: {
|
||||
collapsed: true
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user