WIP - bottom drawer width fix
This commit is contained in:
@@ -11,6 +11,9 @@ import { useSoftphone } from '~/composables/useSoftphone'
|
||||
const isDrawerOpen = useState<boolean>('bottomDrawerOpen', () => false)
|
||||
const activeTab = useState<string>('bottomDrawerTab', () => 'softphone')
|
||||
const drawerHeight = useState<number>('bottomDrawerHeight', () => 240)
|
||||
const props = defineProps<{
|
||||
bounds?: { left: number; width: number }
|
||||
}>()
|
||||
|
||||
const softphone = useSoftphone()
|
||||
|
||||
@@ -190,7 +193,14 @@ onBeforeUnmount(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="pointer-events-none fixed inset-x-0 bottom-0 z-30 flex justify-center px-2">
|
||||
<div
|
||||
class="pointer-events-none fixed bottom-0 z-30 flex justify-center px-2"
|
||||
:style="{
|
||||
left: props.bounds?.left ? `${props.bounds.left}px` : '0',
|
||||
width: props.bounds?.width ? `${props.bounds.width}px` : '100vw',
|
||||
right: props.bounds?.width ? 'auto' : '0',
|
||||
}"
|
||||
>
|
||||
<div
|
||||
class="pointer-events-auto w-full border border-border bg-background shadow-xl transition-all duration-200"
|
||||
:style="{ height: `${isDrawerOpen ? drawerHeight : collapsedHeight}px` }"
|
||||
|
||||
Reference in New Issue
Block a user