feat: add support for more UML arrowheads (#7391)

This commit is contained in:
David Luzar 2023-12-06 16:00:00 +01:00 committed by GitHub
parent a04cc707c3
commit b9cfbc2077
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 449 additions and 216 deletions

View file

@ -1281,7 +1281,7 @@ export const ArrowheadArrowIcon = React.memo(
),
);
export const ArrowheadDotIcon = React.memo(
export const ArrowheadCircleIcon = React.memo(
({ flip = false }: { flip?: boolean }) =>
createIcon(
<g
@ -1296,6 +1296,22 @@ export const ArrowheadDotIcon = React.memo(
),
);
export const ArrowheadCircleOutlineIcon = React.memo(
({ flip = false }: { flip?: boolean }) =>
createIcon(
<g
stroke="currentColor"
fill="none"
transform={flip ? "translate(40, 0) scale(-1, 1)" : ""}
strokeWidth={2}
>
<path d="M26 10L6 10" />
<circle r="4" transform="matrix(-1 0 0 1 30 10)" />
</g>,
{ width: 40, height: 20 },
),
);
export const ArrowheadBarIcon = React.memo(
({ flip = false }: { flip?: boolean }) =>
createIcon(
@ -1326,6 +1342,58 @@ export const ArrowheadTriangleIcon = React.memo(
),
);
export const ArrowheadTriangleOutlineIcon = React.memo(
({ flip = false }: { flip?: boolean }) =>
createIcon(
<g
stroke="currentColor"
fill="none"
transform={flip ? "translate(40, 0) scale(-1, 1)" : ""}
strokeWidth={2}
strokeLinejoin="round"
>
<path d="M6,9.5H27" />
<path d="M27,5L34,10L27,14Z" fill="none" />
</g>,
{ width: 40, height: 20 },
),
);
export const ArrowheadDiamondIcon = React.memo(
({ flip = false }: { flip?: boolean }) =>
createIcon(
<g
stroke="currentColor"
fill="currentColor"
transform={flip ? "translate(40, 0) scale(-1, 1)" : ""}
strokeLinejoin="round"
strokeWidth={2}
>
<path d="M6,9.5H20" />
<path d="M27,5L34,10L27,14L20,9.5Z" />
</g>,
{ width: 40, height: 20 },
),
);
export const ArrowheadDiamondOutlineIcon = React.memo(
({ flip = false }: { flip?: boolean }) =>
createIcon(
<g
stroke="currentColor"
fill="none"
transform={flip ? "translate(40, 0) scale(-1, 1)" : ""}
strokeLinejoin="round"
strokeWidth={2}
>
<path d="M6,9.5H20" />
<path d="M27,5L34,10L27,14L20,9.5Z" />
</g>,
{ width: 40, height: 20 },
),
);
export const FontSizeSmallIcon = createIcon(
<>
<g clipPath="url(#a)">