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
17 lines (14 loc) • 423 B
text/typescript
import {type Path} from '@sanity/types'
import {createContext} from 'react'
/** @internal */
export interface HoveredFieldContextValue {
hoveredStack: string[]
onMouseEnter: (path: Path) => void
onMouseLeave: (path: Path) => void
}
/** @internal */
export const HoveredFieldContext = createContext<HoveredFieldContextValue>({
hoveredStack: [],
onMouseEnter: () => undefined,
onMouseLeave: () => undefined,
})