chore(marker-symbols): use style instead of svg attrs

This commit is contained in:
moklick
2023-09-18 17:20:59 +02:00
parent 1695b2828f
commit 572505ea15
@@ -8,10 +8,12 @@ type SymbolProps = Omit<EdgeMarker, 'type'>;
const ArrowSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => { const ArrowSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
return ( return (
<polyline <polyline
stroke={color} style={{
stroke: color,
strokeWidth,
}}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={strokeWidth}
fill="none" fill="none"
points="-5,-4 0,0 -5,4" points="-5,-4 0,0 -5,4"
/> />
@@ -21,11 +23,13 @@ const ArrowSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
const ArrowClosedSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => { const ArrowClosedSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
return ( return (
<polyline <polyline
stroke={color} style={{
stroke: color,
fill: color,
strokeWidth,
}}
strokeLinecap="round" strokeLinecap="round"
strokeLinejoin="round" strokeLinejoin="round"
strokeWidth={strokeWidth}
fill={color}
points="-5,-4 0,0 -5,4 -5,-4" points="-5,-4 0,0 -5,4 -5,-4"
/> />
); );