mirror of https://github.com/FreeTubeApp/FreeTube
26 lines
406 B
JavaScript
26 lines
406 B
JavaScript
import Vue from 'vue'
|
|
|
|
export default Vue.extend({
|
|
name: 'FtToggleSwitch',
|
|
props: {
|
|
label: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
defaultValue: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
},
|
|
data: function () {
|
|
return {
|
|
id: '',
|
|
currentValue: false
|
|
}
|
|
},
|
|
mounted: function () {
|
|
this.id = this._uid
|
|
this.currentValue = this.defaultValue
|
|
}
|
|
})
|