add useReactNodeView hook

This commit is contained in:
Philipp Kühn
2021-03-14 20:40:40 +01:00
parent 109bff0892
commit 380d27fe86
6 changed files with 75 additions and 13 deletions

View File

@@ -0,0 +1,8 @@
import React, { useContext } from 'react'
export const ReactNodeViewContext = React.createContext<any>({
isEditable: undefined,
onDragStart: undefined,
})
export const useReactNodeView = () => useContext(ReactNodeViewContext)