Skip to content

Commit

Permalink
Fix theme changer position
Browse files Browse the repository at this point in the history
  • Loading branch information
isKONSTANTIN committed Aug 15, 2024
1 parent fe1bc20 commit 922363d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions components/nav/user/theme.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="flex flex-col justify-center items-center">
<div class="dropdown dropdown-bottom dropdown-hover">
<div class="dropdown dropdown-position dropdown-hover">
<div tabindex="0" role="button" class="cursor-pointer size-10 flex justify-center items-center">
<theme-icon :theme="currentTheme"/>
</div>
Expand All @@ -13,7 +13,6 @@
</div>
</li>
<li @click="handleClick">

<div class="flex gap-2 rounded-xl" :class="{ 'bg-base-200' : currentTheme === 'dark' }" @click="currentTheme = 'dark'">
<theme-icon :theme="'dark'"/>

Expand Down Expand Up @@ -66,4 +65,16 @@ const handleClick = () => {
<style scoped>
@media (max-width: 640px) {
.dropdown-position {
@apply dropdown-end
}
}
@media (min-width: 640px) {
.dropdown-position {
@apply dropdown-bottom
}
}
</style>

0 comments on commit 922363d

Please sign in to comment.