Skip to content

Commit

Permalink
Set --form-color as style variable and use it
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragchhatrala committed Nov 5, 2024
1 parent bda37cf commit 8debbef
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
5 changes: 2 additions & 3 deletions client/components/forms/ToggleSwitchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
:id="id ? id : name"
v-model="compVal"
:disabled="disabled ? true : null"
:style="{ '--toggle-color': color }"
:ui="{
active: 'bg-[var(--toggle-color)]',
ring: 'focus:ring-[var(--toggle-color)]/50'
active: 'bg-[var(--form-color)]',
ring: 'focus:ring-[var(--form-color)]/50'
}"
/>

Expand Down
5 changes: 2 additions & 3 deletions client/components/forms/components/CheckboxIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
name="i-material-symbols-check-box"
class="block"
:class="[
theme.FlatSelectInput.icon
theme.FlatSelectInput.icon,
'bg-[var(--form-color)]'
]"
:color="color"
/>
<Icon
v-show="!isChecked"
Expand All @@ -17,7 +17,6 @@
theme.FlatSelectInput.icon,
theme.FlatSelectInput.unselectedIcon,
]"
:color="undefined"
/>
</div>
</template>
Expand Down
5 changes: 2 additions & 3 deletions client/components/forms/components/RadioButtonIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
v-show="isChecked"
name="ic:round-radio-button-checked"
:class="[
theme.FlatSelectInput.icon
theme.FlatSelectInput.icon,
'bg-[var(--form-color)]'
]"
:color="color"
/>
<Icon
v-show="!isChecked"
Expand All @@ -15,7 +15,6 @@
theme.FlatSelectInput.icon,
theme.FlatSelectInput.unselectedIcon,
]"
:color="undefined"
/>
</div>
</template>
Expand Down
3 changes: 2 additions & 1 deletion client/components/open/forms/OpenForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ export default {
},
computedStyle() {
return {
...this.minHeight ? {minHeight: this.minHeight + 'px'} : {}
...this.minHeight ? {minHeight: this.minHeight + 'px'} : {},
'--form-color': this.form.color
}
}
},
Expand Down

0 comments on commit 8debbef

Please sign in to comment.