collaborative-ui
Version:
React component library for building real-time collaborative editing applications.
24 lines (23 loc) • 1.8 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CursorIcon = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const filterId = 'cursorFilter' + Date.now();
const CursorIcon = ({ width = 26, color = '#000' }) => {
const height = (width * 38) / 26;
return (React.createElement("svg", { width: width, height: height, viewBox: "0 0 26 38", fill: "none" },
React.createElement("g", { filter: `url(#${filterId})` },
React.createElement("path", { d: "M3 18.015V2L14.591 13.619H7.55L7.399 13.743L3 18.015Z", fill: "white" }),
React.createElement("path", { d: "M4 4.4071V15.5951L6.969 12.7291L7.129 12.5901H12.165L4 4.4071Z", fill: color })),
React.createElement("defs", null,
React.createElement("filter", { id: filterId, x: "0.4", y: "0.4", width: "25.2", height: "37.2", filterUnits: "userSpaceOnUse" },
React.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
React.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }),
React.createElement("feOffset", { dy: "1" }),
React.createElement("feGaussianBlur", { stdDeviation: "1.3" }),
React.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.32 0" }),
React.createElement("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_7766_1567" }),
React.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow_7766_1567", result: "shape" })))));
};
exports.CursorIcon = CursorIcon;