Skip to content

Commit 6252e7e

Browse files
committed
fix: floating menu bg on mobile, better bg
1 parent 7f7b8d7 commit 6252e7e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

apps/frontend/app/components/chat/ChatFloatingMenu.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
<script setup lang="ts">
22
import { useSidebar } from '@/lib/shadcn/components/ui/sidebar/utils'
33
4-
const { open } = useSidebar()
4+
// `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)
58
</script>
69

710
<template>
811
<div
912
class="flex rounded-md p-1 transition-background-color"
1013
:class="[
11-
open ? '' : 'bg-sidebar-accent-foreground',
14+
isExpanded ? 'bg-transparent' : 'bg-muted-foreground/30',
1215
]"
1316
>
1417
<SidebarTrigger
1518
:class="[
16-
open ? '' : 'color-sidebar-accent',
19+
isExpanded ? '' : 'color-sidebar-accent',
1720
]"
1821
/>
1922
</div>

0 commit comments

Comments
 (0)