koel/resources/assets/js/components/ui/ScreenControlsToggle.vue

23 lines
765 B
Vue
Raw Normal View History

2022-04-15 14:24:30 +00:00
<template>
2024-04-04 22:20:42 +00:00
<label v-if="isMobile.phone" class="text-k-highlight text-base inline-block ml-2">
<input v-model="value" class="hidden" type="checkbox">
2023-11-10 13:16:06 +00:00
<Icon :icon="value ? faCaretUp : faCaretDown" class="toggle" />
2024-04-04 22:20:42 +00:00
<span class="hidden">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'
import { computed } from 'vue'
2022-04-15 14:24:30 +00:00
const props = withDefaults(defineProps<{ modelValue?: boolean }>(), { modelValue: false })
const emit = defineEmits<{ (e: 'update:modelValue', value: boolean): void }>()
const value = computed({
get: () => props.modelValue,
set: value => emit('update:modelValue', value)
})
2022-04-15 14:24:30 +00:00
</script>