Skip to content

Commit

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

<div>
Expand Down Expand Up @@ -52,14 +55,13 @@

<script>
import {inputProps, useFormInput} from "./useFormInput.js"
import VSwitch from "./components/VSwitch.vue"
import InputWrapper from "./components/InputWrapper.vue"
import InputHelp from "~/components/forms/components/InputHelp.vue"
export default {
name: "ToggleSwitchInput",
components: {InputHelp, InputWrapper, VSwitch},
components: {InputHelp, InputWrapper},
props: {
...inputProps,
},
Expand All @@ -74,4 +76,4 @@ export default {
this.compVal = !!this.compVal
},
}
</script>
</script>
54 changes: 0 additions & 54 deletions client/components/forms/components/VSwitch.vue

This file was deleted.

0 comments on commit bda37cf

Please sign in to comment.