2022-04-15 14:24:30 +00:00
|
|
|
<template>
|
2022-09-11 08:06:34 +00:00
|
|
|
<label v-if="isMobile.phone" class="text-highlight">
|
2022-12-02 16:17:37 +00:00
|
|
|
<input v-model="value" type="checkbox">
|
2023-11-10 13:16:06 +00:00
|
|
|
<Icon :icon="value ? faCaretUp : faCaretDown" class="toggle" />
|
2022-09-11 08:06:34 +00:00
|
|
|
<span>Toggle the song list controls</span>
|
|
|
|
</label>
|
2022-04-15 14:24:30 +00:00
|
|
|
</template>
|
|
|
|
|
2022-04-15 17:00:08 +00:00
|
|
|
<script lang="ts" setup>
|
2022-10-25 18:25:58 +00:00
|
|
|
import { faCaretDown, faCaretUp } from '@fortawesome/free-solid-svg-icons'
|
2022-04-15 14:24:30 +00:00
|
|
|
import isMobile from 'ismobilejs'
|
2022-09-11 08:06:34 +00:00
|
|
|
import { computed } from 'vue'
|
2022-04-15 14:24:30 +00:00
|
|
|
|
2022-09-11 08:06:34 +00:00
|
|
|
const props = withDefaults(defineProps<{ modelValue?: boolean }>(), { modelValue: false })
|
|
|
|
|
2022-11-13 15:18:24 +00:00
|
|
|
const emit = defineEmits<{ (e: 'update:modelValue', value: boolean): void }>()
|
2022-09-11 08:06:34 +00:00
|
|
|
|
|
|
|
const value = computed({
|
|
|
|
get: () => props.modelValue,
|
|
|
|
set: value => emit('update:modelValue', value)
|
|
|
|
})
|
2022-04-15 14:24:30 +00:00
|
|
|
</script>
|
|
|
|
|
2024-04-04 20:13:35 +00:00
|
|
|
<style lang="postcss" scoped>
|
2022-09-11 08:06:34 +00:00
|
|
|
label {
|
2022-04-15 14:24:30 +00:00
|
|
|
font-size: 1rem;
|
2022-09-11 08:06:34 +00:00
|
|
|
display: inline-block;
|
2022-04-15 14:24:30 +00:00
|
|
|
margin-left: 4px;
|
|
|
|
}
|
2022-09-11 08:06:34 +00:00
|
|
|
|
|
|
|
input, span {
|
|
|
|
display: none;
|
|
|
|
}
|
2022-04-15 14:24:30 +00:00
|
|
|
</style>
|