Skip to content

Commit cf8a1c0

Browse files
committed
chore: highlight active example
1 parent 60d0763 commit cf8a1c0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/pages/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,12 @@ const HomePage = ({
418418
{codeExamples.map(({ title, description }, idx) => (
419419
<button
420420
key={title}
421-
className="flex flex-col gap-y-0.5 border-t px-6 py-4 hover:bg-background-highlight max-md:hidden"
421+
className={cn(
422+
"flex flex-col gap-y-0.5 border-t px-6 py-4 hover:bg-background-highlight max-md:hidden",
423+
isModalOpen &&
424+
idx === activeCode &&
425+
"bg-background-highlight"
426+
)}
422427
onClick={() => toggleCodeExample(idx)}
423428
>
424429
<p className="font-bold">{title}</p>

0 commit comments

Comments
 (0)