fix(node-resizer): pass minWidth and minHeight to child components
This commit is contained in:
@@ -4,10 +4,10 @@ import { Handle, Position, NodeProps } from 'reactflow';
|
||||
import { NodeResizer } from '@reactflow/node-resizer';
|
||||
import '@reactflow/node-resizer/dist/style.css';
|
||||
|
||||
const CustomNode: FC<NodeProps> = ({ id, data, selected }) => {
|
||||
const CustomNode: FC<NodeProps> = ({ data, selected }) => {
|
||||
return (
|
||||
<>
|
||||
<NodeResizer isVisible={selected} />
|
||||
<NodeResizer minWidth={100} minHeight={100} isVisible={selected} />
|
||||
<Handle type="target" position={Position.Left} />
|
||||
<div>{data.label}</div>
|
||||
<Handle type="source" position={Position.Right} />
|
||||
|
||||
Reference in New Issue
Block a user