refactor(edge-labels): allow React component closes #1045

This commit is contained in:
moklick
2021-03-29 14:21:34 +02:00
parent f5bf40dd35
commit 66e7697e45
2 changed files with 14 additions and 7 deletions
+8 -1
View File
@@ -43,7 +43,14 @@ const initialElements: Elements = [
id: 'e5-6',
source: '5',
target: '6',
label: 'styled label',
label: (
<>
<tspan>i am using</tspan>
<tspan dy={10} x={0}>
{'<tspan>'}
</tspan>
</>
),
labelStyle: { fill: 'red', fontWeight: 700 },
arrowHeadType: ArrowHeadType.Arrow,
},