mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 22:16:58 +00:00
25 lines
764 B
TypeScript
25 lines
764 B
TypeScript
import { iframeOptions } from '@/sanity.config'
|
|
import { DocumentsIcon, EyeOpenIcon, MasterDetailIcon } from '@sanity/icons'
|
|
import Iframe from 'sanity-plugin-iframe-pane'
|
|
import { ListItemBuilder } from 'sanity/desk'
|
|
import defineStructure from '../utils/define-structure'
|
|
|
|
export default defineStructure<ListItemBuilder>((S) =>
|
|
S.listItem()
|
|
.title('Pages')
|
|
.schemaType('page')
|
|
.icon(DocumentsIcon)
|
|
.child (
|
|
S.documentTypeList('page')
|
|
.child (id =>
|
|
S.document()
|
|
.schemaType("page")
|
|
.id(id)
|
|
.views([
|
|
S.view.form().icon(MasterDetailIcon),
|
|
S.view.component(Iframe).icon(EyeOpenIcon).options(iframeOptions).title('Preview')
|
|
])
|
|
)
|
|
|
|
)
|
|
) |