forked from Mirrors/elk
10 lines
362 B
TypeScript
10 lines
362 B
TypeScript
import { fontSizeMap } from '~/constants/options'
|
|
import { DEFAULT_FONT_SIZE } from '~/constants'
|
|
|
|
export default defineNuxtPlugin(() => {
|
|
const userSettings = useUserSettings()
|
|
const html = document.querySelector('html')!
|
|
watchEffect(() => {
|
|
html.style.setProperty('--font-size', fontSizeMap[userSettings.value.fontSize || DEFAULT_FONT_SIZE])
|
|
})
|
|
})
|