atst/js/components/toggler.js
2019-04-29 10:46:21 -04:00

29 lines
472 B
JavaScript

import FormMixin from '../mixins/form'
import textinput from './text_input'
export default {
name: 'toggler',
mixins: [FormMixin],
components: {
textinput,
},
data: function() {
return {
selectedSection: null,
}
},
methods: {
toggleSection: function(sectionName) {
if (this.selectedSection === sectionName) {
this.selectedSection = null
} else {
this.selectedSection = sectionName
}
},
},
}