2022-04-15 14:24:30 +00:00
|
|
|
<template>
|
2022-07-15 07:23:55 +00:00
|
|
|
<span v-if="isMobile.phone" class="text-highlight" data-testid="controls-toggle" @click="$emit('toggleControls')">
|
|
|
|
<icon v-if="showingControls" :icon="showingControls ? faAngleUp : faAngleDown" class="toggle"/>
|
2022-04-15 14:24:30 +00:00
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
|
2022-04-15 17:00:08 +00:00
|
|
|
<script lang="ts" setup>
|
2022-07-15 07:23:55 +00:00
|
|
|
import { faAngleDown, faAngleUp } from '@fortawesome/free-solid-svg-icons'
|
2022-04-15 14:24:30 +00:00
|
|
|
import isMobile from 'ismobilejs'
|
2022-04-15 17:00:08 +00:00
|
|
|
import { toRefs } from 'vue'
|
2022-04-15 14:24:30 +00:00
|
|
|
|
2022-05-11 17:16:31 +00:00
|
|
|
const props = withDefaults(defineProps<{ showingControls?: boolean }>(), { showingControls: true })
|
2022-04-15 17:00:08 +00:00
|
|
|
const { showingControls } = toRefs(props)
|
2022-04-15 14:24:30 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2022-06-10 10:47:46 +00:00
|
|
|
.toggle {
|
2022-04-15 14:24:30 +00:00
|
|
|
font-size: 1rem;
|
|
|
|
margin-left: 4px;
|
|
|
|
}
|
|
|
|
</style>
|