Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix: convert ArrowheadNoneIcon to component matching arrowhead icon pattern (#10789)

Christopher Tangonanc1e00c44f578
diff --git a/packages/excalidraw/actions/actionProperties.tsx b/packages/excalidraw/actions/actionProperties.tsx
index d15f9de166..7fb9ed0e86 100644
--- a/packages/excalidraw/actions/actionProperties.tsx
+++ b/packages/excalidraw/actions/actionProperties.tsx
@@ -1555,7 +1555,7 @@ const getArrowheadOptions = (flip: boolean) => {
value: null,
text: t("labels.arrowhead_none"),
keyBinding: "q",
- icon: ArrowheadNoneIcon,
+ icon: <ArrowheadNoneIcon flip={flip} />,
},
{
value: "arrow",
diff --git a/packages/excalidraw/components/icons.tsx b/packages/excalidraw/components/icons.tsx
index 6a7a934083..4a1691863f 100644
--- a/packages/excalidraw/components/icons.tsx
+++ b/packages/excalidraw/components/icons.tsx
@@ -1287,13 +1287,21 @@ export const EdgeRoundIcon = createIcon(
tablerIconProps,
);
-export const ArrowheadNoneIcon = createIcon(
- <g stroke="currentColor" opacity={0.3} strokeWidth={2}>
- <path d="M12 12l9 0" />
- <path d="M3 9l6 6" />
- <path d="M3 15l6 -6" />
- </g>,
- tablerIconProps,
+export const ArrowheadNoneIcon = React.memo(
+ ({ flip = false }: { flip?: boolean }) =>
+ createIcon(
+ <g
+ transform={flip ? "translate(24, 0) scale(-1, 1)" : ""}
+ stroke="currentColor"
+ opacity={0.3}
+ strokeWidth={2}
+ >
+ <path d="M12 12l-9 0" />
+ <path d="M21 9l-6 6" />
+ <path d="M21 15l-6 -6" />
+ </g>,
+ tablerIconProps,
+ ),
);
export const ArrowheadArrowIcon = React.memo(