adding sanity components
This commit is contained in:
37
schemas/objects/feobj/qrCode.ts
Normal file
37
schemas/objects/feobj/qrCode.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { defineField, defineType } from 'sanity';
|
||||
import MyPreviewComponent from '../../../components/MyPreviewComponent'
|
||||
|
||||
export const qrCode = defineType({
|
||||
name: 'qrCode',
|
||||
title: 'QR Code',
|
||||
type: 'object',
|
||||
fields: [
|
||||
defineField({
|
||||
name: 'image',
|
||||
type: 'reference',
|
||||
to: {
|
||||
type: 'media',
|
||||
components: {
|
||||
preview: MyPreviewComponent
|
||||
}
|
||||
},
|
||||
}),
|
||||
defineField({
|
||||
name: 'text',
|
||||
type: 'object',
|
||||
fields: [
|
||||
defineField({
|
||||
name: 'title',
|
||||
type: 'string',
|
||||
}),
|
||||
defineField({
|
||||
name: 'subtitle',
|
||||
type: 'string',
|
||||
}),
|
||||
]
|
||||
})
|
||||
],
|
||||
options: {
|
||||
collapsed: true
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user