Skip to content

Commit

Permalink
➕ Add defaul values to SwitchToggle
Browse files Browse the repository at this point in the history
  • Loading branch information
devmount committed Sep 27, 2024
1 parent 3ad1ee5 commit 29eb3ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/tbpro/elements/SwitchToggle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ interface Props {
label?: string; // input label
noLegend?: boolean; // hide "on" and "off" labels
}
const props = defineProps<Props>();
const props = withDefaults(defineProps<Props>(), {
disabled: false,
label: null,
noLegend: true,
});
// current state
const state = ref(false);
Expand Down

0 comments on commit 29eb3ee

Please sign in to comment.