Skip to content
Source
Sign inSign up
fuko/trytanstackdb.com
Open History to see the last commit

icons.tsx

54 lines1.4 KB

1import { Signature, Users } from "lucide-react";
2​
3import { cn } from "@/lib/utils";
4​
5/** The yellow Quick Notes tile from the Notes sidebar. */
6export function QuickNotesIcon({ className }: { className?: string }) {
7 return (
8 <span
9 aria-hidden
10 className={cn(
11 "grid size-[18px] shrink-0 place-items-center rounded-[5px] bg-notes-quick text-white",
12 className,
13 )}
14 >
15 <Signature className="size-[70%]" strokeWidth={2.2} />
16 </span>
17 );
19​
20/** The blue Shared tile from the Notes sidebar. */
21export function SharedIcon({ className }: { className?: string }) {
22 return (
23 <span
24 aria-hidden
25 className={cn(
26 "grid size-[18px] shrink-0 place-items-center rounded-[5px] bg-notes-shared text-white",
27 className,
28 )}
29 >
30 <Users className="size-[70%]" strokeWidth={2.4} />
31 </span>
32 );
34​
35/** Account avatar: initials on a gradient, like an iCloud account without a photo. */
36export function AccountAvatar({ name, className }: { name: string; className?: string }) {
37 const initials = name
38 .split(" ")
39 .map((part) => part[0])
40 .join("")
41 .slice(0, 2)
42 .toUpperCase();
43 return (
44 <span
45 aria-hidden
46 className={cn(
47 "grid size-7 shrink-0 place-items-center rounded-full bg-gradient-to-b from-[#a1a1aa] to-[#71717a] text-[11px] font-semibold text-white",
48 className,
49 )}
50 >
51 {initials}
52 </span>
53 );