tiptap/packages/react/src/NodeViewContent.tsx
Philipp Kühn a3a847f711 code style
2021-06-14 16:06:49 +02:00

23 lines
428 B
TypeScript

import React from 'react'
export interface NodeViewContentProps {
[key: string]: any,
as?: React.ElementType,
}
export const NodeViewContent: React.FC<NodeViewContentProps> = React.forwardRef((props, ref) => {
const Tag = props.as || 'div'
return (
<Tag
{...props}
ref={ref}
data-node-view-content=""
style={{
...props.style,
whiteSpace: 'pre-wrap',
}}
/>
)
})