1
0
mirror of https://github.com/elk-zone/elk synced 2024-12-18 16:48:01 +09:00
elk/components/nav/SelectFontSize.vue
2022-12-24 00:19:17 +01:00

24 lines
498 B
Vue

<script lang="ts" setup>
import type { FontSize } from '~/composables/fontSize'
const sizes = ['xs', 'sm', 'md', 'lg', 'xl'] as FontSize[]
const fontSize = getFontSize()
</script>
<template>
<CommonDropdown>
<slot />
<template #popper>
<CommonDropdownItem
v-for="size in sizes"
:key="size"
:checked="size === fontSize"
@click="fontSize = size"
>
{{ size }}
</CommonDropdownItem>
</template>
</CommonDropdown>
</template>