20 lines
477 B
Plaintext
20 lines
477 B
Plaintext
|
---
|
||
|
// github.com/rezahedi/rezahedi.dev/blob/main/src/components/TOCHeading.astro
|
||
|
const { heading } = Astro.props;
|
||
|
---
|
||
|
|
||
|
<li>
|
||
|
<a class="inline-block py-1" href={"#" + heading.slug}>
|
||
|
{heading.text}
|
||
|
</a>
|
||
|
{
|
||
|
heading.subheadings.length > 0 && (
|
||
|
<ul class="px-2">
|
||
|
{heading.subheadings.map((subheading: any) => (
|
||
|
<Astro.self heading={subheading} />
|
||
|
))}
|
||
|
</ul>
|
||
|
)
|
||
|
}
|
||
|
</li>
|