Making better toggle

This commit is contained in:
Erin
2019-07-25 22:00:24 -05:00
parent d635d1e607
commit 8bd232d665
2 changed files with 3 additions and 2 deletions

View File

@@ -3,7 +3,9 @@
.sidebar .sidebar
template(v-for='category in categories') template(v-for='category in categories')
nuxt-link(:to='category.slug') {{ category.title }} nuxt-link(:to='category.slug') {{ category.title }}
input(type='checkbox' :checked='cardsShown' @change="toggleCardsShown()") div(@click="toggleCardsShown")
div(class="viewToggle" :class="{active: cardsShown}") Cards
div(class="viewToggle" :class="{active: !cardsShown}") Table
</template> </template>
<script> <script>

View File

@@ -21,7 +21,6 @@ export default {
return { return {
categoryRouteTitle: this.$route.params.category, categoryRouteTitle: this.$route.params.category,
categories: store categories: store
// cardsShown: store.cardsShown,
}; };
}, },
computed: { computed: {