Files
romm/frontend/src/components/ControlPanel/General/ThemeOption.vue
2024-06-12 12:33:36 +02:00

28 lines
661 B
Vue

<script setup lang="ts">
import { useDisplay } from "vuetify";
const { xs } = useDisplay();
withDefaults(defineProps<{ text: string; icon: string }>(), {
text: "",
icon: "",
});
</script>
<template>
<v-item v-slot="{ isSelected, toggle }">
<v-card
:color="isSelected ? 'romm-accent-1' : 'romm-gray'"
class="d-flex align-center"
height="50"
variant="outlined"
@click="toggle"
>
<div class="text-subtitle-2 flex-grow-1 text-center text-capitalize">
<v-icon>
{{ icon }}
</v-icon>
<span class="ml-2" v-if="!xs">{{ text }}</span>
</div>
</v-card>
</v-item>
</template>