diff --git a/lib/extensions/paragraph.d.ts b/lib/extensions/paragraph.d.ts index f603194..f15714c 100644 --- a/lib/extensions/paragraph.d.ts +++ b/lib/extensions/paragraph.d.ts @@ -41,6 +41,6 @@ export default class Paragraph extends Extension { customMenu({ state, dispatch }: { state: any; dispatch: any; - }): JSX.Element; + }): JSX.Element | null; onClick(state: any, dispatch: any): void; } diff --git a/lib/types/index.d.ts b/lib/types/index.d.ts index 4e1d7f1..7341a2e 100644 --- a/lib/types/index.d.ts +++ b/lib/types/index.d.ts @@ -46,18 +46,18 @@ export declare abstract class Extension { customMenu?({ state, dispatch }: { state: EditorState; dispatch: Dispatch; - }): JSX.Element; + }): JSX.Element | null; customInlineMenu?({ state, dispatch }: { state: EditorState; dispatch: Dispatch; - }): JSX.Element; - customLayout?(props: CustomLayoutProps, dom: HTMLElement): JSX.Element; + }): JSX.Element | null; + customLayout?(props: CustomLayoutProps, dom: HTMLElement): JSX.Element | null; customButton?({ state, dispatch }: { state: EditorState; dispatch: Dispatch; - }): JSX.Element; - customIcon?: JSX.Element | string; - icon?: JSX.Element | string; + }): JSX.Element | null; + customIcon?: JSX.Element | string | null; + icon?: JSX.Element | string | null; plugins?: Plugin[]; showMenu: boolean; hideMenuOnFocus?: boolean;