Preview: useReactNodeView.ts
Size: 392 B
/home/byroehnu/.trash/node_modules11/@adminjs/design-system/node_modules/@tiptap/react/src/useReactNodeView.ts
import { createContext, useContext } from 'react'
export interface ReactNodeViewContextProps {
onDragStart: (event: DragEvent) => void,
nodeViewContentRef: (element: HTMLElement | null) => void,
}
export const ReactNodeViewContext = createContext<Partial<ReactNodeViewContextProps>>({
onDragStart: undefined,
})
export const useReactNodeView = () => useContext(ReactNodeViewContext)
Directory Contents
Dirs: 0 × Files: 12