elk/components/settings/SettingsFontSize.vue
2023-01-09 22:27:03 +02:00

15 lines
524 B
Vue

<script lang="ts" setup>
import { DEFAULT_FONT_SIZE } from '~/constants'
import type { FontSize } from '~/types'
const sizes = ['xs', 'sm', 'md', 'lg', 'xl'] as FontSize[]
const fontSize = useFontSizeRef()
</script>
<template>
<select v-model="fontSize">
<option v-for="size in sizes" :key="size" :value="size" :selected="fontSize === size">
{{ `${$t(`settings_interface_size_label_${size}`)}${size === DEFAULT_FONT_SIZE ? ` ${$t('settings_interface_default')}` : ''}` }}
</option>
</select>
</template>