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
template(v-for='category in categories')
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>
<script>