How to use the @sanity/desk-tool/structure-builder.document function in @sanity/desk-tool

To help you get started, we’ve selected a few @sanity/desk-tool examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sanity-io / sanity / packages / test-studio / src / deskStructure.js View on Github external
export const getDefaultDocumentNode = () => {
  return S.document().views([
    S.view.form().icon(EditIcon),
    S.view
      .component(DeveloperPreview)
      .options({some: 'option'})
      .icon(EyeIcon)
      .title('Preview')
  ])
}
github sanity-io / sanity / packages / preview-nextjs-landing-pages-studio / src / deskStructure.js View on Github external
.child(documentId =>
              S.document()
                .documentId(documentId)
                .schemaType('person')
                .views([S.view.form(), S.view.component(Preview)])
            )
github sanity-io / sanity / packages / preview-gatsby-blog-studio / src / deskStructure.js View on Github external
.child(documentId =>
              S.document()
                .documentId(documentId)
                .schemaType('post')
                .views([S.view.form(), S.view.component(Preview)])
            )