You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
412 B

  1. <template lang="pug">
  2. .toggle(:class='{ "is-active": currentValue }', @click='changeToggle')
  3. .toggle-container
  4. .toggle-pin
  5. .toggle-text {{ desc }}
  6. </template>
  7. <script>
  8. export default {
  9. name: 'toggle',
  10. props: ['currentValue', 'desc'],
  11. data () {
  12. return { }
  13. },
  14. methods: {
  15. changeToggle() {
  16. this.currentValue = !this.currentValue
  17. }
  18. }
  19. }
  20. </script>