beautiful-react-diagram の CustomNode の props

2021/3/13
reactbeautiful-react-diagram

型がなくて知らなかったのだが、

className: ""
content: ""
data: {}
id: "node-custom"
inputs: [{…}]
outputs: []
render: ƒ CustomNode(props)
type: "default"

のような中身だった。

ちなみに inputs の中身は、

$$typeof: Symbol(react.element)
key: "custom-port-1"
props:
alignment: "left"
id: "custom-port-1"
onDragNewSegment: ƒ (portId, from, to, alignment)
onMount: ƒ (portId, portElement)
onSegmentConnect: ƒ onSegmentConnect(input, output)
onSegmentFail: ƒ ()
type: "input"
key: (...)
get key: ƒ ()
__proto__: Object
ref: null
type: {$$typeof: Symbol(react.memo), compare: null, type: ƒ}
_owner: FiberNode {tag: 0, key: null, stateNode: null, elementType: ƒ, type: ƒ, …}
_store: {validated: false}
_self: null
_source: null
__proto__: Object
length: 1
__proto__: Array(0)