2022-12-24 07:47:13 +09:00
|
|
|
<script lang="ts" setup>
|
2022-12-24 08:19:17 +09:00
|
|
|
import type { FontSize } from '~/composables/fontSize'
|
|
|
|
|
|
|
|
const sizes = ['xs', 'sm', 'md', 'lg', 'xl'] as FontSize[]
|
|
|
|
const fontSize = getFontSize()
|
2022-12-24 07:47:13 +09:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<CommonDropdown>
|
|
|
|
<slot />
|
|
|
|
|
|
|
|
<template #popper>
|
|
|
|
<CommonDropdownItem
|
|
|
|
v-for="size in sizes"
|
|
|
|
:key="size"
|
|
|
|
:checked="size === fontSize"
|
2022-12-24 08:19:17 +09:00
|
|
|
@click="fontSize = size"
|
2022-12-24 07:47:13 +09:00
|
|
|
>
|
|
|
|
{{ size }}
|
|
|
|
</CommonDropdownItem>
|
|
|
|
</template>
|
|
|
|
</CommonDropdown>
|
|
|
|
</template>
|