adding sanity components
This commit is contained in:
28
schemas/objects/stats.ts
Normal file
28
schemas/objects/stats.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { defineField, defineType } from 'sanity';
|
||||
|
||||
export const stats = defineType({
|
||||
name: 'stats',
|
||||
title: 'Statistics',
|
||||
type: 'object',
|
||||
fields: [
|
||||
defineField({
|
||||
name: 'number',
|
||||
title: 'Number',
|
||||
type: 'number'
|
||||
}),
|
||||
defineField({
|
||||
name: 'title',
|
||||
title: 'Title',
|
||||
type: 'string'
|
||||
}),
|
||||
],
|
||||
options: {
|
||||
columns: 2
|
||||
},
|
||||
preview: {
|
||||
select: {
|
||||
title: 'number',
|
||||
subtitle: 'title'
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user