remove unnecessary helpers (#241)

This commit is contained in:
Nolan Lawson 2018-04-29 18:41:56 -07:00 committed by GitHub
parent a368294b43
commit c4182c9ddc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,6 @@
<a class="settings-nav-item {{getCurrentClass(page, name)}}" <a class="settings-nav-item {{className}}"
aria-label={{getAriaLabel(page, name, label)}} aria-label={{ariaLabel}}
:href :href >
>
{{label}} {{label}}
</a> </a>
<style> <style>
@ -15,13 +14,9 @@
</style> </style>
<script> <script>
export default { export default {
helpers: { computed: {
getCurrentClass (page, name) { className: (page, name) => page === name ? 'selected' : '',
return page === name ? 'selected' : '' ariaLabel: (page, name, label) => page === name ? `${label} (current page)` : label
},
getAriaLabel (page, name, label) {
return page === name ? `${label} (current page)` : label
}
} }
} }
</script> </script>