UNPKG

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

20 lines (15 loc) 417 B
import {useContext} from 'react' import {PaneLayoutContext} from './PaneLayoutContext' import {type PaneLayoutContextValue} from './types' /** * * @hidden * @beta This API will change. DO NOT USE IN PRODUCTION. */ export function usePaneLayout(): PaneLayoutContextValue { const pane = useContext(PaneLayoutContext) if (!pane) { throw new Error('PaneLayout: missing context value') } return pane }