add classname support for react components
This commit is contained in:
@@ -2,7 +2,8 @@ import React from 'react'
|
||||
import { useReactNodeView } from './useReactNodeView'
|
||||
|
||||
export interface NodeViewContentProps {
|
||||
as: React.ElementType
|
||||
className?: string,
|
||||
as: React.ElementType,
|
||||
}
|
||||
|
||||
export const NodeViewContent: React.FC<NodeViewContentProps> = props => {
|
||||
@@ -11,6 +12,7 @@ export const NodeViewContent: React.FC<NodeViewContentProps> = props => {
|
||||
|
||||
return (
|
||||
<Tag
|
||||
className={props.className}
|
||||
data-node-view-content=""
|
||||
contentEditable={isEditable}
|
||||
style={{ whiteSpace: 'pre-wrap' }}
|
||||
|
||||
@@ -2,7 +2,8 @@ import React from 'react'
|
||||
import { useReactNodeView } from './useReactNodeView'
|
||||
|
||||
export interface NodeViewWrapperProps {
|
||||
as: React.ElementType
|
||||
className?: string,
|
||||
as: React.ElementType,
|
||||
}
|
||||
|
||||
export const NodeViewWrapper: React.FC<NodeViewWrapperProps> = props => {
|
||||
@@ -11,6 +12,7 @@ export const NodeViewWrapper: React.FC<NodeViewWrapperProps> = props => {
|
||||
|
||||
return (
|
||||
<Tag
|
||||
className={props.className}
|
||||
data-node-view-wrapper=""
|
||||
onDragStart={onDragStart}
|
||||
style={{ whiteSpace: 'normal' }}
|
||||
|
||||
Reference in New Issue
Block a user