● Zion Boggan
repos/Docket/components/custody-mark.tsx
zionboggan.com ↗
112 lines · tsx
History for this file →
1
import { clsx } from "@/lib/cx";
2
 
3
 
4
export function CustodyMark({
5
  size = 28,
6
  className,
7
  showTick = true,
8
}: {
9
  size?: number;
10
  className?: string;
11
  showTick?: boolean;
12
}) {
13
  if (size < 24) {
14
    return (
15
      <span
16
        className={clsx("inline-block align-middle", className)}
17
        style={{ width: size, height: size }}
18
        role="img"
19
        aria-label="Docket"
20
      >
21
        <svg
22
          width={size}
23
          height={size}
24
          viewBox="0 0 32 32"
25
          fill="none"
26
          xmlns="http://www.w3.org/2000/svg"
27
          aria-hidden="true"
28
        >
29
          <rect width="32" height="32" rx="6" fill="var(--dk-signal)" />
30
          {}
31
          <path
32
            d="M9 7 H19 L23 11 V25 H9 Z"
33
            fill="var(--dk-ink)"
34
          />
35
          {}
36
          <path d="M19 7 L23 11 H19 Z" fill="var(--dk-signal)" />
37
        </svg>
38
      </span>
39
    );
40
  }
41
 
42
  return (
43
    <span
44
      className={clsx("inline-block align-middle", className)}
45
      style={{ width: size, height: size }}
46
      role="img"
47
      aria-label="Docket"
48
    >
49
      <svg
50
        width={size}
51
        height={size}
52
        viewBox="0 0 100 100"
53
        fill="none"
54
        xmlns="http://www.w3.org/2000/svg"
55
        aria-hidden="true"
56
      >
57
        {}
58
        <path
59
          d="M26 16 H60 L80 36 V86 H26 Z"
60
          fill="none"
61
          stroke="var(--dk-paper)"
62
          strokeWidth="5"
63
          strokeLinejoin="round"
64
        />
65
        {}
66
        <path
67
          d="M60 16 V36 H80"
68
          fill="none"
69
          stroke="var(--dk-signal)"
70
          strokeWidth="5"
71
          strokeLinejoin="round"
72
        />
73
        {}
74
        {showTick && (
75
          <>
76
            <line
77
              x1="37"
78
              y1="54"
79
              x2="69"
80
              y2="54"
81
              stroke="var(--dk-paper)"
82
              strokeWidth="5"
83
              strokeLinecap="round"
84
              opacity="0.5"
85
            />
86
            <line
87
              x1="37"
88
              y1="68"
89
              x2="60"
90
              y2="68"
91
              stroke="var(--dk-paper)"
92
              strokeWidth="5"
93
              strokeLinecap="round"
94
              opacity="0.5"
95
            />
96
          </>
97
        )}
98
      </svg>
99
    </span>
100
  );
101
}
102
 
103
export function Wordmark({ className }: { className?: string }) {
104
  return (
105
    <span
106
      className={clsx("font-display", className)}
107
      style={{ fontWeight: 800, letterSpacing: "-0.02em", lineHeight: 1 }}
108
    >
109
      Docket
110
    </span>
111
  );
112
}