LegalTableOfContents
Reusable legal table of contents component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<LegalTableOfContents
title="On this page"
items="[]"
/>Legacy mount name: data-component="LegalTableOfContents".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
title | string | Optional | "On this page" |
items | string | Optional | [] |
class | string | Optional | "" |
Slots
This component does not declare a slot.
Events
This component does not declare a custom event.
Source contract
Installed source: components/LegalTableOfContents.wrn
component LegalTableOfContents {
props {
title = "On this page"
items = []
class = ""
}
view {
<nav aria-label="{title}" class="wire-legal-toc {class}">
<h2>{title}</h2>
<ol>{#each items as item}<li>
<a href="{item.href}">{item.label}</a>
</li>{/each}</ol>
</nav>
}
}