Skip to content

Commit

Permalink
pass cols to switch separately from the label
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta committed Jul 15, 2023
1 parent 7491b70 commit 4f286f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions photon-client/src/components/common/cv-switch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const props = withDefaults(defineProps<{
value: boolean,
disabled?: boolean,
labelCols?: number,
switchCols?: number
}>(), {
disabled: false,
labelCols: 2
Expand All @@ -30,13 +31,13 @@ const localValue = computed({
dense
align="center"
>
<v-col :cols="labelCols">
<v-col :cols="(12 - switchCols) || labelCols">
<tooltipped-label
:tooltip="tooltip"
:label="label"
/>
</v-col>
<v-col :cols="12 - labelCols">
<v-col :cols="switchCols || (12 - labelCols)">
<v-switch
v-model="localValue"
dark
Expand Down

0 comments on commit 4f286f8

Please sign in to comment.