fix: rename key to pluginKey for menus

This commit is contained in:
Philipp Kühn
2021-08-13 12:33:06 +02:00
parent 8fd75bc4b6
commit 89d26f7cba
12 changed files with 40 additions and 40 deletions

View File

@@ -10,14 +10,14 @@ export const FloatingMenu: React.FC<FloatingMenuProps> = props => {
useEffect(() => {
const {
key,
pluginKey,
editor,
tippyOptions,
shouldShow,
} = props
editor.registerPlugin(FloatingMenuPlugin({
key,
pluginKey,
editor,
element: element.current as HTMLElement,
tippyOptions,
@@ -25,7 +25,7 @@ export const FloatingMenu: React.FC<FloatingMenuProps> = props => {
}))
return () => {
editor.unregisterPlugin(key)
editor.unregisterPlugin(pluginKey)
}
}, [])