Fix item highlighting

This commit is contained in:
Terry Sutton committed 2022-12-06 22:33:04 -03:30
1 parent 3378c44b33
commit 86fc7506ee
5 files changed
+7 -5

No files matched your search

+3 -1
View File
@@ -18,6 +18,7 @@ type RefSubLayoutSubComponents = {
type StickyHeader = {
id: string
slug?: string
title?: string
monoFont?: boolean
scrollSpyHeader?: boolean // whether or not the header updates the url on scroll
@@ -36,6 +37,7 @@ const RefSubLayout: FC<RefSubLayoutType> & RefSubLayoutSubComponents = (props) =
}
const Section: FC<ISectionContainer> = (props) => {
console.log({ props })
return (
<article key={props.id}>
<StickyHeader {...props} />
@@ -57,7 +59,7 @@ const StickyHeader: FC<StickyHeader> = (props) => {
return (
<h2
ref={ref}
id={props.id}
id={props.slug}
className={[
'text-xl font-medium text-scale-1200 mb-8 scroll-mt-24',
props.monoFont && 'font-mono',
+1 -1
View File
@@ -76,7 +76,7 @@ export default function DartReference(props) {
key={item.id}
title={item.meta.title}
id={item.id}
slug={item.id}
slug={item.slug}
scrollSpyHeader={true}
>
<RefSubLayout.Details>
@@ -76,7 +76,7 @@ export default function DartReference(props) {
key={item.id}
title={item.meta.title}
id={item.id}
slug={item.id}
slug={item.slug}
scrollSpyHeader={true}
>
<RefSubLayout.Details>
@@ -80,7 +80,7 @@ export default function JSReference(props) {
key={item.id}
title={item.meta.title}
id={item.id}
slug={item.id}
slug={item.slug}
scrollSpyHeader={true}
>
<RefSubLayout.Details>
@@ -76,7 +76,7 @@ export default function DartReference(props) {
key={item.id}
title={item.meta.title}
id={item.id}
slug={item.id}
slug={item.slug}
scrollSpyHeader={true}
>
<RefSubLayout.Details>