123456789101112131415161718192021222324252627282930 |
- <template>
- <nuxt-link :to="to" :class="{'is-active': isActive}">
- <slot />
- </nuxt-link>
- </template>
- <script>
- export default {
- props: {
- to: {
- type: String,
- required: true
- }
- },
- computed: {
- isActive() {
- // debugger
- return this.to === this.$route.path
- }
- }
- }
- </script>
- <style scoped lang="scss">
- /*TODO: Get here color variables*/
- .is-active {
- border-bottom: 4px solid $primary;
- font-weight: bold;
- }
- </style>
|