pinafore/routes/_components/settings/SettingsNavItem.html
Nolan Lawson 42be854521
upgrade to svelte 2.0 (#251)
* upgrade to svelte 2.0

* update svelte-loader to 2.9.0
2018-05-01 17:05:36 -07:00

22 lines
448 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>