sanity
Version:
Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches
12 lines (10 loc) • 397 B
text/typescript
import {type ComponentType} from 'react'
import {type DocumentLayoutProps, type PluginOptions} from 'sanity'
/**
* Pick the document layout component when composing the component middleware chain.
*/
export function pickDocumentLayoutComponent(plugin: PluginOptions) {
return plugin.document?.components?.unstable_layout as ComponentType<
Omit<DocumentLayoutProps, 'renderDefault'>
>
}