set cookie for sidebar preference

This commit is contained in:
dandds
2019-02-11 13:52:18 -05:00
parent cfd871716b
commit 35b87ff091
5 changed files with 60 additions and 23 deletions

23
js/mixins/toggle.js Normal file
View File

@@ -0,0 +1,23 @@
export default {
data: function() {
return {
isVisible: this.defaultVisible,
}
},
render: function(createElement) {
return createElement(this.$vnode.data.tag, [
this.$scopedSlots.default({
isVisible: this.isVisible,
toggle: this.toggle,
}),
])
},
methods: {
toggle: function(e) {
e.preventDefault()
this.isVisible = !this.isVisible
},
},
}