tighter check
This commit is contained in:
@@ -149,7 +149,9 @@
|
|||||||
label: 'Explicit Prop Blue Color (should override CSS)',
|
label: 'Explicit Prop Blue Color (should override CSS)',
|
||||||
markerEnd: {
|
markerEnd: {
|
||||||
type: MarkerType.ArrowClosed,
|
type: MarkerType.ArrowClosed,
|
||||||
color: '#0000ff'
|
color: '#0000ff',
|
||||||
|
width: 40,
|
||||||
|
height: 40
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -159,7 +161,9 @@
|
|||||||
label: 'Marker No Prop Color (should use CSS variable)',
|
label: 'Marker No Prop Color (should use CSS variable)',
|
||||||
markerEnd: {
|
markerEnd: {
|
||||||
type: MarkerType.ArrowClosed,
|
type: MarkerType.ArrowClosed,
|
||||||
color: null
|
color: undefined,
|
||||||
|
width: 40,
|
||||||
|
height: 40
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ type SymbolProps = Omit<EdgeMarker, 'type'>;
|
|||||||
const ArrowSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
|
const ArrowSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
|
||||||
const style = {
|
const style = {
|
||||||
strokeWidth,
|
strokeWidth,
|
||||||
...(color !== 'none' && { stroke: color, fill: color }),
|
...(color && color !== 'none' && { stroke: color, fill: color }),
|
||||||
};
|
};
|
||||||
|
|
||||||
return <polyline style={style} strokeLinecap="round" strokeLinejoin="round" fill="none" points="-5,-4 0,0 -5,4" />;
|
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 ArrowClosedSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
|
||||||
const style = {
|
const style = {
|
||||||
strokeWidth,
|
strokeWidth,
|
||||||
...(color !== 'none' && { stroke: color, fill: color }),
|
...(color && color !== 'none' && { stroke: color, fill: color }),
|
||||||
};
|
};
|
||||||
|
|
||||||
return <polyline style={style} strokeLinecap="round" strokeLinejoin="round" points="-5,-4 0,0 -5,4 -5,-4" />;
|
return <polyline style={style} strokeLinecap="round" strokeLinejoin="round" points="-5,-4 0,0 -5,4 -5,-4" />;
|
||||||
|
|||||||
Reference in New Issue
Block a user