Preview: NodeViewWrapper.tsx
Size: 579 B
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@tiptap/react/src/NodeViewWrapper.tsx
import React from 'react'
import { useReactNodeView } from './useReactNodeView.js'
export interface NodeViewWrapperProps {
[key: string]: any,
as?: React.ElementType,
}
export const NodeViewWrapper: React.FC<NodeViewWrapperProps> = React.forwardRef((props, ref) => {
const { onDragStart } = useReactNodeView()
const Tag = props.as || 'div'
return (
// @ts-ignore
<Tag
{...props}
ref={ref}
data-node-view-wrapper=""
onDragStart={onDragStart}
style={{
whiteSpace: 'normal',
...props.style,
}}
/>
)
})
Directory Contents
Dirs: 0 × Files: 14