@1771technologies/lytenyte-pro
Version:
Blazingly fast headless React data grid with 100s of features.
20 lines (19 loc) • 730 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
const ROTATION = {
up: 0,
right: 90,
down: 180,
left: 270,
};
export function annotationArrow(options) {
const direction = options?.direction ?? "up";
const color = options?.color ?? "#3b82f6";
const size = options?.size ?? 24;
return () => (_jsx("div", { style: {
position: "absolute",
inset: 0,
display: "flex",
alignItems: "center",
justifyContent: "center",
}, children: _jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", style: { transform: `rotate(${ROTATION[direction]}deg)` }, children: _jsx("path", { d: "M12 2 L22 20 L12 15 L2 20 Z", fill: color }) }) }));
}