wallet-connect-web-examples/advanced/dapps/vue-dapp-auth/components/SwitchTheme.vue
Glitch deb123f283
restructure (#345)
* restructure

* udpate readme links
2023-12-13 15:36:25 -03:00

34 lines
735 B
Vue

<template>
<lib-radio
v-model="$colorMode.preference"
:options="themeModes"
>
<template #option="{ option, checked }">
<a
v-if="option === 'system'"
role="button"
class="tw-radio-option"
:class="{ checked }"
>
<icon name="desktop" />
</a>
<a
v-else-if="option === 'light'"
role="button"
class="tw-radio-option"
:class="{ checked }"
>
<icon name="sun" class="tw-scale-[1.2]" />
</a>
<a
v-else-if="option === 'dark'"
role="button"
class="tw-radio-option"
:class="{ checked }"
>
<icon name="moon" />
</a>
</template>
</lib-radio>
</template>