add dark dropdown & company switch (#1167)

* add dark mode in basedropdown

* dark mod add in global search, header

* add dark mode in company switch

* indentation issue fix company switch

* fix dropdown issues

---------

Co-authored-by: yogesh-gohil <yogeshgohil1611@gmail.com>
This commit is contained in:
Yash Kanakiya
2023-03-28 11:30:00 +05:30
committed by GitHub
parent c5acf1343e
commit f6639f5863
21 changed files with 225 additions and 162 deletions

View File

@ -69,7 +69,8 @@ const props = defineProps({
})
const containerClasses = computed(() => {
const baseClass = `origin-top-right rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 divide-y divide-gray-100 focus:outline-none`
const baseClass = `dark:border dark:border-white/10 dark:text-white dark:bg-gray-800 dark:shadow-glass
origin-top-right rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 divide-y divide-gray-100 focus:outline-none`
return `${baseClass} ${props.containerClass}`
})

View File

@ -2,16 +2,20 @@
<MenuItem v-slot="{ active }" v-bind="$attrs">
<a
href="#"
class="group flex items-center px-4 py-2 text-sm font-normal"
:class="[
active ? 'bg-gray-100 text-gray-900' : 'text-gray-700',
'group flex items-center px-4 py-2 text-sm font-normal',
active
? 'bg-gray-100 text-gray-900 dark:text-white dark:bg-gray-700'
: 'text-gray-700 dark:text-gray-200',
]"
>
<slot :active="active" />
<slot :active="active" :class="defaultIconClass" />
</a>
</MenuItem>
</template>
<script setup>
import { MenuItem } from '@headlessui/vue'
const defaultIconClass =
'w-5 h-5 mr-3 text-gray-400 group-hover:text-gray-500 dark:text-gray-400 dark:group-hover:text-white'
</script>