pinafore/routes/_components/settings/SettingsNavItem.html
2018-04-29 18:41:56 -07:00

22 lines
445 B
HTML

<a class="settings-nav-item {{className}}"
aria-label={{ariaLabel}}
:href >
{{label}}
</a>
<style>
a.settings-nav-item {
font-size: 1.2em;
}
a.settings-nav-item.selected {
font-weight: 600;
}
</style>
<script>
export default {
computed: {
className: (page, name) => page === name ? 'selected' : '',
ariaLabel: (page, name, label) => page === name ? `${label} (current page)` : label
}
}
</script>