adding sanity components
This commit is contained in:
25
schemas/documents/technologies.ts
Normal file
25
schemas/documents/technologies.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import MyPreviewComponent from "@/components/MyPreviewComponent";
|
||||
import { defineField, defineType } from "sanity";
|
||||
|
||||
export const technologies = defineType({
|
||||
name: 'technologies',
|
||||
title: 'Technologies',
|
||||
type: 'document',
|
||||
fields: [
|
||||
defineField({
|
||||
name: 'title',
|
||||
title: 'Title',
|
||||
type: 'string',
|
||||
}),
|
||||
defineField({
|
||||
name: 'image',
|
||||
type: 'reference',
|
||||
to: {
|
||||
type: 'media',
|
||||
components: {
|
||||
preview: MyPreviewComponent
|
||||
}
|
||||
},
|
||||
}),
|
||||
],
|
||||
})
|
||||
Reference in New Issue
Block a user