feat: add tippyOptions prop

This commit is contained in:
Philipp Kühn
2021-04-16 12:42:56 +02:00
parent 398fc7f210
commit 9a56f666a1
10 changed files with 56 additions and 12 deletions

View File

@@ -9,11 +9,12 @@ export const BubbleMenu: React.FC<BubbleMenuProps> = props => {
const element = useRef<HTMLDivElement>(null)
useEffect(() => {
const { editor } = props
const { editor, tippyOptions } = props
editor.registerPlugin(BubbleMenuPlugin({
editor,
element: element.current as HTMLElement,
tippyOptions,
}))
return () => {