diff --git a/src/components/InfoCard/InfoCard.tsx b/src/components/InfoCard/InfoCard.tsx index 300414413..9727b8692 100644 --- a/src/components/InfoCard/InfoCard.tsx +++ b/src/components/InfoCard/InfoCard.tsx @@ -1,15 +1,23 @@ -import { DefaultMantineColor, HoverCard, HoverCardProps, SystemProp, useMantineTheme} from '@mantine/core'; -import { RichTextEditor, RichTextEditorProps, Link } from '@mantine/tiptap'; +import { + DefaultMantineColor, + HoverCard, + HoverCardProps, + SystemProp, + useMantineTheme, +} from '@mantine/core'; +import { Link, RichTextEditor, RichTextEditorProps } from '@mantine/tiptap'; +import { IconInfoCircle } from '@tabler/icons-react'; import { useEditor } from '@tiptap/react'; import StarterKit from '@tiptap/starter-kit'; -import { IconInfoCircle } from '@tabler/icons-react'; + +type A = HoverCardProps['position']; interface InfoCardProps { bg?: SystemProp; cardProp?: Partial; content: string; hoverProp?: Partial; - position?: "bottom" | "left" | "right" | "top" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" + position?: HoverCardProps['position']; } export const InfoCard = ({ bg, cardProp, content, hoverProp, position }: InfoCardProps) => { @@ -17,38 +25,25 @@ export const InfoCard = ({ bg, cardProp, content, hoverProp, position }: InfoCar const editor = useEditor({ content, editable: false, - editorProps: { attributes: { style: 'padding: 0;' }, }, - extensions: [ - StarterKit, - Link, - ], + editorProps: { attributes: { style: 'padding: 0;' } }, + extensions: [StarterKit, Link], }); return ( - + - - + + - ) -}; \ No newline at end of file + ); +};