2021-03-14 23:30:06 +08:00
|
|
|
import React from 'react'
|
|
|
|
|
2021-03-15 04:45:14 +08:00
|
|
|
export interface NodeViewContentProps {
|
2021-03-18 16:38:10 +08:00
|
|
|
className?: string,
|
2021-04-08 15:11:45 +08:00
|
|
|
as?: React.ElementType,
|
2021-03-15 04:45:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export const NodeViewContent: React.FC<NodeViewContentProps> = props => {
|
|
|
|
const Tag = props.as || 'div'
|
|
|
|
|
2021-03-14 23:30:06 +08:00
|
|
|
return (
|
2021-03-15 04:45:14 +08:00
|
|
|
<Tag
|
2021-03-18 16:38:10 +08:00
|
|
|
className={props.className}
|
2021-03-14 23:30:06 +08:00
|
|
|
data-node-view-content=""
|
2021-03-15 05:41:25 +08:00
|
|
|
style={{ whiteSpace: 'pre-wrap' }}
|
2021-03-14 23:30:06 +08:00
|
|
|
/>
|
|
|
|
)
|
|
|
|
}
|