Skip to content

Commit

Permalink
fix checkbox and radio icon
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragchhatrala committed Oct 31, 2024
1 parent e70a4c8 commit df96fe7
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
29 changes: 21 additions & 8 deletions client/components/forms/components/CheckboxIcon.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
<template>
<Icon
:name="isChecked ? 'material-symbols:check-box' : 'material-symbols:check-box-outline-blank'"
:class="[
theme.FlatSelectInput.icon,
isChecked ? '' : theme.FlatSelectInput.unselectedIcon,
]"
:color="isChecked ? color : undefined"
/>
<div>
<Icon
v-show="isChecked"
name="i-material-symbols-check-box"
class="block"
:class="[
theme.FlatSelectInput.icon
]"
:color="color"
/>
<Icon
v-show="!isChecked"
name="i-material-symbols-check-box-outline-blank"
class="block"
:class="[
theme.FlatSelectInput.icon,
theme.FlatSelectInput.unselectedIcon,
]"
:color="undefined"
/>
</div>
</template>

<script setup>
Expand Down
29 changes: 19 additions & 10 deletions client/components/forms/components/RadioButtonIcon.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
<template>
<Icon
:name="isChecked ? 'ic:round-radio-button-checked' : 'ic:round-radio-button-unchecked'"
:class="[
theme.FlatSelectInput.icon,
isChecked ? '' : theme.FlatSelectInput.unselectedIcon,
]"
:color="isChecked ? color : undefined"
/>
<div>
<Icon
v-show="isChecked"
name="ic:round-radio-button-checked"
:class="[
theme.FlatSelectInput.icon
]"
:color="color"
/>
<Icon
v-show="!isChecked"
name="ic:round-radio-button-unchecked"
:class="[
theme.FlatSelectInput.icon,
theme.FlatSelectInput.unselectedIcon,
]"
:color="undefined"
/>
</div>
</template>

<script setup>
import { computed } from 'vue'
const props = defineProps({
isChecked: {
type: Boolean,
Expand Down

0 comments on commit df96fe7

Please sign in to comment.