mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-18 14:08:06 +01:00
feat(Modal): add fullscreen prop (#523)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
committed by
Benjamin Canac
parent
ccb0f6207c
commit
7e2bebd3ef
@@ -8,7 +8,18 @@
|
||||
<div :class="ui.inner">
|
||||
<div :class="[ui.container, ui.padding]">
|
||||
<TransitionChild as="template" :appear="appear" v-bind="transitionClass">
|
||||
<HDialogPanel :class="[ui.base, ui.width, ui.height, ui.background, ui.ring, ui.rounded, ui.shadow]">
|
||||
<HDialogPanel
|
||||
:class="[
|
||||
ui.base,
|
||||
ui.background,
|
||||
ui.ring,
|
||||
ui.shadow,
|
||||
fullscreen ? 'w-screen' : ui.width,
|
||||
fullscreen ? 'h-screen' : ui.height,
|
||||
fullscreen ? 'rounded-none' : ui.rounded,
|
||||
fullscreen ? 'm-0' : ui.margin
|
||||
]"
|
||||
>
|
||||
<slot />
|
||||
</HDialogPanel>
|
||||
</TransitionChild>
|
||||
@@ -58,6 +69,10 @@ export default defineComponent({
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
fullscreen: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
ui: {
|
||||
type: Object as PropType<Partial<typeof appConfig.ui.modal>>,
|
||||
default: () => appConfig.ui.modal
|
||||
|
||||
Reference in New Issue
Block a user