Skip to content

Commit

Permalink
fix: fix ts error for BubbleMenu and FloatingMenu in @tiptap/react (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
c0sc0s committed May 10, 2024
1 parent 152c7cb commit baff4af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/react/src/BubbleMenu.tsx
Expand Up @@ -5,7 +5,8 @@ import { useCurrentEditor } from './Context.js'

type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;

export type BubbleMenuProps = Omit<Optional<BubbleMenuPluginProps, 'pluginKey' | 'editor'>, 'element'> & {
export type BubbleMenuProps = Omit<Optional<BubbleMenuPluginProps, 'pluginKey'>, 'element' | 'editor'> & {
editor: BubbleMenuPluginProps['editor'] | null;
className?: string;
children: React.ReactNode;
updateDelay?: number;
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/FloatingMenu.tsx
Expand Up @@ -7,7 +7,8 @@ import { useCurrentEditor } from './Context.js'

type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>

export type FloatingMenuProps = Omit<Optional<FloatingMenuPluginProps, 'pluginKey' | 'editor'>, 'element'> & {
export type FloatingMenuProps = Omit<Optional<FloatingMenuPluginProps, 'pluginKey'>, 'element' | 'editor'> & {
editor: FloatingMenuPluginProps['editor'] | null;
className?: string,
children: React.ReactNode
}
Expand Down

0 comments on commit baff4af

Please sign in to comment.