on master help sign in
TableOfContents: highlight category titles
commit8755bd22926b4a9a6a129360ebab7e79297e1b0f authorMatilde Park <matilde.park@urbit.org> dateTue 14 Jun 2022, 11:00 (4 years ago) parent85b5500
1 file changed+5−1
components/TableOfContents.js+5−1
components/TableOfContents.js+5−1
@@ -56,7 +56,11 @@ const Headings = ({ headings, activeId }) => (
5656 {headings.map((heading, index) => (
5757 <li key={heading.id}>
5858 <a
59− className={index === 0 ? "font-bold" : "font-medium text-sm"}
59+ className={classNames({
60+ "font-bold": index === 0,
61+ "font-medium text-sm": index !== 0,
62+ "text-green-400": heading.id === activeId && index !== 0,
63+ })}
6064 href={`#${heading.id}`}
6165 >
6266 {heading.title}