You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
392 B
13 lines
392 B
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)
|