pinafore/routes/_components/settings/SettingsNavItem.html

22 lines
448 B
HTML
Raw Normal View History

<a class="settings-nav-item {className}"
aria-label={ariaLabel}
{href} >
{label}
2018-01-13 19:53:25 +01:00
</a>
<style>
a.settings-nav-item {
2018-01-13 19:53:25 +01:00
font-size: 1.2em;
}
a.settings-nav-item.selected {
2018-01-13 19:53:25 +01:00
font-weight: 600;
}
</style>
<script>
export default {
2018-04-30 03:41:56 +02:00
computed: {
className: ({ page, name }) => page === name ? 'selected' : '',
ariaLabel: ({ page, name, label }) => page === name ? `${label} (current page)` : label
2018-01-13 19:53:25 +01:00
}
}
</script>