mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: replace editor icon with custom PNG using CSS mask
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -1,21 +1,19 @@
|
||||
import type { SVGProps } from "react";
|
||||
|
||||
export function ImageEditIcon(props: SVGProps<SVGSVGElement>) {
|
||||
export function ImageEditIcon({ className }: { className?: string }) {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth={2}
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
{...props}
|
||||
>
|
||||
<path d="M12 20H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v7" />
|
||||
<circle cx="8.5" cy="8.5" r="1.5" />
|
||||
<path d="m3 20 4.5-4.5L10 18" />
|
||||
<path d="m18.4 12.6-5.9 5.9-.5 2.5 2.5-.5 5.9-5.9a1.5 1.5 0 0 0-2.1-2.1z" />
|
||||
</svg>
|
||||
<span
|
||||
className={className}
|
||||
style={{
|
||||
display: "inline-block",
|
||||
backgroundColor: "currentColor",
|
||||
maskImage: "url(/edit-image.png)",
|
||||
maskSize: "contain",
|
||||
maskRepeat: "no-repeat",
|
||||
maskPosition: "center",
|
||||
WebkitMaskImage: "url(/edit-image.png)",
|
||||
WebkitMaskSize: "contain",
|
||||
WebkitMaskRepeat: "no-repeat",
|
||||
WebkitMaskPosition: "center",
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FolderOpen, Grid3x3, HelpCircle, LayoutGrid, Settings, Workflow } from "lucide-react";
|
||||
import type { ComponentType, SVGProps } from "react";
|
||||
import type { ComponentType } from "react";
|
||||
import { Link, useLocation } from "react-router-dom";
|
||||
import { useTranslation } from "@/contexts/i18n-context";
|
||||
import { cn } from "@/lib/utils";
|
||||
@@ -7,7 +7,7 @@ import { ImageEditIcon } from "../common/image-edit-icon";
|
||||
import { OtterLogo } from "../common/otter-logo";
|
||||
|
||||
interface SidebarItem {
|
||||
icon: ComponentType<SVGProps<SVGSVGElement>>;
|
||||
icon: ComponentType<{ className?: string }>;
|
||||
label: string;
|
||||
href?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user