chore: use CSS instead of icon for sidebar toggl button state

This commit is contained in:
Phan An 2024-08-18 17:16:14 +02:00
parent bb47d5fb3b
commit 67d34cc2b0

View file

@ -5,13 +5,12 @@
hover:text-k-text-primary hover:bg-k-highlight"
>
<input v-model="value" class="hidden" type="checkbox">
<Icon v-if="value" :icon="faAngleLeft" />
<Icon v-else :icon="faAngleRight" />
<Icon :class="value || 'scale-x-[-1]'" :icon="faAngleLeft" class="transition" />
</label>
</template>
<script lang="ts" setup>
import { faAngleLeft, faAngleRight } from '@fortawesome/free-solid-svg-icons'
import { faAngleLeft } from '@fortawesome/free-solid-svg-icons'
import { computed } from 'vue'
const props = withDefaults(defineProps<{ modelValue?: boolean }>(), { modelValue: false })