File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,12 @@ export function TocHeroContents({
2424 What will you find here?
2525 </ h2 >
2626 < ul
27- className = "grid grid-flow-row-dense grid-rows-2 gap-px border-t border-inherit bg-neu-300 dark:bg-neu-100"
28- style = { {
29- gridTemplateColumns : `repeat(${ sections . length / 2 } , 1fr)` ,
30- } }
27+ className = { clsx (
28+ "grid grid-flow-row-dense grid-rows-2 gap-px border-t border-inherit bg-neu-300 dark:bg-neu-100" ,
29+ sections . length > 3
30+ ? "grid-cols-2 lg:grid-cols-[repeat(3,1fr)]"
31+ : "grid-cols-1" ,
32+ ) }
3133 >
3234 { sections . map ( ( section , i ) => {
3335 const { name, href } =
@@ -41,10 +43,10 @@ export function TocHeroContents({
4143 return (
4244 < li key = { i } >
4345 < a
44- className = "flex items-center gap-2 whitespace-nowrap bg-neu-0 p-3 hover:bg-neu-50 lg:py-5"
46+ className = "flex h-full items-center gap-2 bg-neu-0 p-2 text-left hover:bg-neu-50 max-sm:text-sm sm:gap-2 sm:p-3 lg:py-5"
4547 href = { href }
4648 >
47- < ChevronRight className = "size-4 translate-x-[0.5px]" />
49+ < ChevronRight className = "size-4 shrink-0 translate-x-[0.5px]" />
4850 { name }
4951 </ a >
5052 </ li >
You can’t perform that action at this time.
0 commit comments