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
22 lines (18 loc) • 507 B
text/typescript
import {createContext} from 'react'
import {type DocumentFieldActionNode} from '../../../config'
/** @internal */
export interface FieldActionsContextValue {
actions: DocumentFieldActionNode[]
focused?: boolean
hovered: boolean
onMouseEnter: () => void
onMouseLeave: () => void
}
/** @internal */
export const FieldActionsContext = createContext<FieldActionsContextValue>({
actions: [],
focused: false,
hovered: false,
onMouseEnter: () => undefined,
onMouseLeave: () => undefined,
})