Skip to content

Commit

Permalink
fix: use verbatim import
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdoro committed May 28, 2024
1 parent 6254cb3 commit 1c4df17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/headless/src/extensions/slash-command.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { RefObject } from 'react';
import { Extension } from "@tiptap/core";
import type { Editor, Range } from "@tiptap/core";
import { ReactRenderer } from "@tiptap/react";
import Suggestion, { type SuggestionOptions } from "@tiptap/suggestion";
import type { RefObject } from "react";
import type { ReactNode } from "react";
import tippy, { type GetReferenceClientRect, type Instance, type Props } from "tippy.js";
import { EditorCommandOut } from "../components/editor-command";
Expand All @@ -29,7 +29,7 @@ const Command = Extension.create({
},
});

const renderItems = (elementRef?: RefObject<Element> | null = null) => {
const renderItems = (elementRef?: RefObject<Element> | null) => {
let component: ReactRenderer | null = null;
let popup: Instance<Props>[] | null = null;

Expand All @@ -52,7 +52,7 @@ const renderItems = (elementRef?: RefObject<Element> | null = null) => {
// @ts-ignore
popup = tippy("body", {
getReferenceClientRect: props.clientRect,
appendTo: () => elementRef ? elementRef.current : document.body,
appendTo: () => (elementRef ? elementRef.current : document.body),
content: component.element,
showOnCreate: true,
interactive: true,
Expand Down

0 comments on commit 1c4df17

Please sign in to comment.