Files
swingmusic-extended/src/components/SettingsView/Components/Switch.vue
T
geoffrey45 62b9aa7a3e Redesign page search input area
+ redefine global search input colors
+ redesign settings page
+ move settings text to a strings module
+ add title and description to now playing settings
2023-01-13 18:13:49 +03:00

42 lines
711 B
Vue

<template>
<div class="switch rounded" :class="{ toggled: state }">
<div class="circle circular"></div>
</div>
</template>
<script setup lang="ts">
defineProps<{
state: boolean;
}>();
</script>
<style lang="scss">
.switch {
height: 1.5rem;
background-color: $gray3;
width: 2.5rem;
padding: $smaller;
position: relative;
transition: all 0.25s ease;
.circle {
transition: all 0.25s ease;
height: 1rem;
aspect-ratio: 1;
background-color: $gray1;
position: absolute;
left: $smaller;
}
}
.toggled {
background-color: $darkestblue;
transition-delay: 0.15s;
.circle {
background-color: $white;
left: calc((100% - ($smaller + 1rem)));
}
}
</style>