Files
Snip/src/components/icons.tsx
T

179 lines
4.1 KiB
TypeScript

// Minimal stroke icons (lucide-style), themed via currentColor.
import type { SVGProps } from "react";
type IconProps = SVGProps<SVGSVGElement> & { size?: number };
function Svg({ size = 18, children, ...rest }: IconProps & { children: React.ReactNode }) {
return (
<svg
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth={1.75}
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden
{...rest}
>
{children}
</svg>
);
}
export const Link = (p: IconProps) => (
<Svg {...p}>
<path d="M10 13a5 5 0 0 0 7.07 0l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" />
<path d="M14 11a5 5 0 0 0-7.07 0l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />
</Svg>
);
export const Copy = (p: IconProps) => (
<Svg {...p}>
<rect x="9" y="9" width="11" height="11" rx="2" />
<path d="M5 15V5a2 2 0 0 1 2-2h10" />
</Svg>
);
export const Check = (p: IconProps) => (
<Svg {...p}>
<path d="m20 6-11 11-5-5" />
</Svg>
);
export const Qr = (p: IconProps) => (
<Svg {...p}>
<rect x="3" y="3" width="7" height="7" rx="1" />
<rect x="14" y="3" width="7" height="7" rx="1" />
<rect x="3" y="14" width="7" height="7" rx="1" />
<path d="M14 14h3v3M21 14v.01M14 21h.01M17 21h4v-4" />
</Svg>
);
export const Edit = (p: IconProps) => (
<Svg {...p}>
<path d="M12 20h9" />
<path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z" />
</Svg>
);
export const Trash = (p: IconProps) => (
<Svg {...p}>
<path d="M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" />
<path d="M10 11v6M14 11v6" />
</Svg>
);
export const Lock = (p: IconProps) => (
<Svg {...p}>
<rect x="4" y="11" width="16" height="10" rx="2" />
<path d="M8 11V7a4 4 0 0 1 8 0v4" />
</Svg>
);
export const Plus = (p: IconProps) => (
<Svg {...p}>
<path d="M12 5v14M5 12h14" />
</Svg>
);
export const Search = (p: IconProps) => (
<Svg {...p}>
<circle cx="11" cy="11" r="7" />
<path d="m21 21-4.3-4.3" />
</Svg>
);
export const X = (p: IconProps) => (
<Svg {...p}>
<path d="M18 6 6 18M6 6l12 12" />
</Svg>
);
export const Sun = (p: IconProps) => (
<Svg {...p}>
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" />
</Svg>
);
export const Moon = (p: IconProps) => (
<Svg {...p}>
<path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z" />
</Svg>
);
export const ChevronLeft = (p: IconProps) => (
<Svg {...p}>
<path d="m15 18-6-6 6-6" />
</Svg>
);
export const ChevronRight = (p: IconProps) => (
<Svg {...p}>
<path d="m9 18 6-6-6-6" />
</Svg>
);
export const ChevronDown = (p: IconProps) => (
<Svg {...p}>
<path d="m6 9 6 6 6-6" />
</Svg>
);
export const LogOut = (p: IconProps) => (
<Svg {...p}>
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5M21 12H9" />
</Svg>
);
export const ArrowRight = (p: IconProps) => (
<Svg {...p}>
<path d="M5 12h14M13 5l7 7-7 7" />
</Svg>
);
export const Shuffle = (p: IconProps) => (
<Svg {...p}>
<path d="M18 4h3v3M3 20l18-16M21 16v3h-3M14 14l5 5M4 4l6 6" />
</Svg>
);
export const Sparkle = (p: IconProps) => (
<Svg {...p}>
<path d="M12 3v18M3 12h18M6.5 6.5l11 11M17.5 6.5l-11 11" opacity={0.55} />
<path d="M12 7v10M7 12h10" />
</Svg>
);
export const Type = (p: IconProps) => (
<Svg {...p}>
<path d="M4 7V5h16v2M9 19h6M12 5v14" />
</Svg>
);
export const Download = (p: IconProps) => (
<Svg {...p}>
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3" />
</Svg>
);
export const Grid = (p: IconProps) => (
<Svg {...p}>
<rect x="3" y="3" width="7" height="9" rx="1" />
<rect x="14" y="3" width="7" height="5" rx="1" />
<rect x="14" y="12" width="7" height="9" rx="1" />
<rect x="3" y="16" width="7" height="5" rx="1" />
</Svg>
);
export const Scissors = (p: IconProps) => (
<Svg {...p}>
<circle cx="6" cy="6" r="3" />
<circle cx="6" cy="18" r="3" />
<path d="M20 4 8.12 15.88M14.47 14.48 20 20M8.12 8.12 12 12" />
</Svg>
);