allow null and correct behavior

This commit is contained in:
Alessandro
2025-08-11 13:02:16 +02:00
parent d8808e09e6
commit 4c389117b7
4 changed files with 50 additions and 6 deletions
@@ -8,7 +8,7 @@ type SymbolProps = Omit<EdgeMarker, 'type'>;
const ArrowSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
const style = {
strokeWidth,
...(color && color !== 'none' && { stroke: color, fill: color }),
...(color && { stroke: color }),
};
return <polyline style={style} strokeLinecap="round" strokeLinejoin="round" fill="none" points="-5,-4 0,0 -5,4" />;
@@ -17,7 +17,7 @@ const ArrowSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
const ArrowClosedSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
const style = {
strokeWidth,
...(color && color !== 'none' && { stroke: color, fill: color }),
...(color && { stroke: color, fill: color }),
};
return <polyline style={style} strokeLinecap="round" strokeLinejoin="round" points="-5,-4 0,0 -5,4 -5,-4" />;