Skip to content

Commit 62f4279

Browse files
feat: add ability for custom drills
1 parent ce26567 commit 62f4279

4 files changed

Lines changed: 676 additions & 85 deletions

File tree

src/components/Openings/OpeningDrillSidebar.tsx

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,16 @@ export const OpeningDrillSidebar: React.FC<Props> = ({
153153
<p className="text-xxs text-secondary">
154154
Drill #{order}
155155
</p>
156-
<p className="text-sm font-medium text-white/95">
157-
{selection.opening.name}
158-
</p>
156+
<div className="flex flex-wrap items-center gap-2">
157+
<p className="text-sm font-medium text-white/95">
158+
{selection.opening.name}
159+
</p>
160+
{selection.opening.isCustom && (
161+
<span className="rounded border border-human-4/40 bg-human-4/10 px-2 py-0.5 text-xxs font-semibold uppercase tracking-wide text-human-2">
162+
Custom
163+
</span>
164+
)}
165+
</div>
159166
{selection.variation && (
160167
<p className="text-xs text-white/70">
161168
{selection.variation.name}
@@ -195,9 +202,16 @@ export const OpeningDrillSidebar: React.FC<Props> = ({
195202
/>
196203
</div>
197204
<div className="min-w-0 flex-1">
198-
<p className="truncate text-xs font-medium text-white/90">
199-
{selection.opening.name}
200-
</p>
205+
<div className="flex flex-wrap items-center gap-2">
206+
<p className="truncate text-xs font-medium text-white/90">
207+
{selection.opening.name}
208+
</p>
209+
{selection.opening.isCustom && (
210+
<span className="rounded border border-human-4/40 bg-human-4/10 px-2 py-0.5 text-xxs font-semibold uppercase tracking-wide text-human-2">
211+
Custom
212+
</span>
213+
)}
214+
</div>
201215
{selection.variation && (
202216
<p className="truncate text-[11px] text-white/60">
203217
{selection.variation.name}

0 commit comments

Comments
 (0)