Elffuss BraidHub

kikocis/continue public

0e7d07cb2a28 · 648 BRawPermalink
1import {
2 NodeViewWrapper as TiptapNodeViewWrapper,
3 NodeViewWrapperProps as TiptapNodeViewWrapperProps,
4} from "@tiptap/react";
5import React from "react";
6
7interface NodeViewWrapperProps {
8 children: React.ReactNode;
9}
10
11export const NodeViewWrapper: React.FC<NodeViewWrapperProps> = ({
12 children,
13}) => {
14 // Not setting this as a "p" will cause issues with foreign keyboards
15 // See https://github.com/continuedev/continue/issues/3199
16 const nodeViewWrapperTag: TiptapNodeViewWrapperProps["as"] = "p";
17
18 return (
19 <TiptapNodeViewWrapper className="my-1.5" as={nodeViewWrapperTag}>
20 {children}
21 </TiptapNodeViewWrapper>
22 );
23};