We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f7b8d7 commit 6252e7eCopy full SHA for 6252e7e
1 file changed
apps/frontend/app/components/chat/ChatFloatingMenu.vue
@@ -1,19 +1,22 @@
1
<script setup lang="ts">
2
import { useSidebar } from '@/lib/shadcn/components/ui/sidebar/utils'
3
4
-const { open } = useSidebar()
+// `state` does not apply to mobile, so we uses 3 props instead
5
+const { isMobile, openMobile, open } = useSidebar()
6
+
7
+const isExpanded = computed(() => isMobile.value ? openMobile.value : open.value)
8
</script>
9
10
<template>
11
<div
12
class="flex rounded-md p-1 transition-background-color"
13
:class="[
- open ? '' : 'bg-sidebar-accent-foreground',
14
+ isExpanded ? 'bg-transparent' : 'bg-muted-foreground/30',
15
]"
16
>
17
<SidebarTrigger
18
- open ? '' : 'color-sidebar-accent',
19
+ isExpanded ? '' : 'color-sidebar-accent',
20
21
/>
22
</div>
0 commit comments