fix: align desktop habit detail with task pane
This commit is contained in:
@@ -13,7 +13,8 @@ const props = withDefaults(defineProps<{
|
||||
closeOnScrim?: boolean
|
||||
variant?: 'create' | 'detail' | 'actions'
|
||||
panelClass?: string
|
||||
}>(), { busy: false, modal: true, closeOnScrim: true, variant: 'detail', panelClass: '' })
|
||||
inlineTarget?: string
|
||||
}>(), { busy: false, modal: true, closeOnScrim: true, variant: 'detail', panelClass: '', inlineTarget: '' })
|
||||
defineOptions({ inheritAttrs: false })
|
||||
const emit = defineEmits<{ close: [] }>()
|
||||
const panel = ref<HTMLElement | null>(null)
|
||||
@@ -79,6 +80,11 @@ onBeforeUnmount(deactivate)
|
||||
</component>
|
||||
</div>
|
||||
</Teleport>
|
||||
<Teleport v-else-if="inlineTarget" :to="inlineTarget">
|
||||
<component v-if="open" :is="$attrs.onSubmit ? 'form' : 'section'" ref="panel" class="app-sheet" :class="[`app-sheet--${variant}`, panelClass]" role="dialog" :aria-labelledby="titleId" :aria-describedby="descriptionId" :aria-label="label" :aria-busy="busy || undefined" v-bind="$attrs">
|
||||
<slot />
|
||||
</component>
|
||||
</Teleport>
|
||||
<component v-else-if="open" :is="$attrs.onSubmit ? 'form' : 'section'" ref="panel" class="app-sheet" :class="[`app-sheet--${variant}`, panelClass]" role="dialog" :aria-labelledby="titleId" :aria-describedby="descriptionId" :aria-label="label" v-bind="$attrs">
|
||||
<slot />
|
||||
</component>
|
||||
|
||||
Reference in New Issue
Block a user