Files
thetool/public/plugins/vue/tt-components/tt-switch.js
Luca Haid fef4457c52 - improved map performance
- improved look and feel
- minified
2025-09-22 12:55:23 +02:00

15 lines
573 B
JavaScript

Vue.component('tt-switch', {
template: `
<label class="tt-switch" :class="{'m-0': noMargin}">
<input type="checkbox" :checked="value" @change="$emit('input', $event.target.checked)" :disabled="loading">
<span class="slider round">
<span v-if="loading" class="spinner-wrapper"><span class="spinner"></span></span>
</span>
</label>
`,
props: {
value: { type: Boolean, default: false },
loading: { type: Boolean, default: false },
noMargin: { type: Boolean, default: false }
}
});