Skip to content

Commit

Permalink
fix: documentation deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisMazel committed Apr 25, 2024
1 parent 1d2fab3 commit 3adbb32
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 24 deletions.
8 changes: 4 additions & 4 deletions packages/lib/components/MazBackdrop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@
const emits = defineEmits<{
/** emitted when modal is open */
(name: 'open'): void
open: [value: void]
/** emitted when modal is close */
(name: 'close'): void
close: [value: void]
/** emitted when modal is open or close */
(name: 'update:model-value', value: boolean): void
'update:model-value': [value: boolean]
/** emitted before modal is close */
(name: 'before-close'): void
'before-close': [value: void]
}>()
export type Props = {
Expand Down
23 changes: 13 additions & 10 deletions packages/lib/components/MazDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<MazBackdrop
v-bind="backdropAttrs"
:persistent
:model-value="modelValue"
transition-name="modal-anim"
aria-labelledby="dialogTitle"
aria-describedby="dialogDesc"
Expand Down Expand Up @@ -72,12 +73,14 @@
type StyleValue,
type HTMLAttributes,
} from 'vue'
import MazBackdrop from './MazBackdrop.vue'
import MazBackdrop, { type Props as MazBackdropProps } from './MazBackdrop.vue'
const MazBtn = defineAsyncComponent(() => import('./MazBtn.vue'))
const XIcon = defineAsyncComponent(() => import('./../icons/x-mark.svg'))
export type Props = {
/** @model Modal's model value */
modelValue: boolean
/** Title of the modal in header */
title?: string
/** Remove the close button in header */
Expand All @@ -94,7 +97,7 @@
persistent?: boolean
}
withDefaults(defineProps<Props>(), {
withDefaults(defineProps<Props & MazBackdropProps>(), {
title: undefined,
noClose: false,
width: '500px',
Expand All @@ -104,14 +107,14 @@
persistent: false,
})
defineEmits([
/** Model binding */
'update:model-value',
/** Emitted when dialog is closed (after animation) */
'close',
/** Emitted when dialog is opened (after animation) */
'open',
])
defineEmits<{
/** emitted when modal is open */
open: [value: void]
/** emitted when modal is close */
close: [value: void]
/** emitted when modal is open or close */
'update:model-value': [value: boolean]
}>()
const attrs = useAttrs()
Expand Down
20 changes: 10 additions & 10 deletions packages/lib/components/MazDialogPromise.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,6 @@
type DialogData,
} from './MazDialogPromise/use-maz-dialog-promise'
export type { Color, Size } from './types'
export type Props = {
/** Dialog Data - type DialogData */
data?: DialogData
/** Uniq identifier */
identifier: string
/** Custom buttons - type DialogButton[] */
buttons?: CustomDialogButton[]
} & MazDialogProps
</script>

<script lang="ts" setup>
Expand All @@ -110,7 +101,16 @@
import MazDialog, { type Props as MazDialogProps } from './MazDialog.vue'
const MazBtn = defineAsyncComponent(() => import('./MazBtn.vue'))
const props = withDefaults(defineProps<Props>(), {
export type Props = {
/** Dialog Data - type DialogData */
data?: DialogData
/** Uniq identifier */
identifier: string
/** Custom buttons - type DialogButton[] */
buttons?: CustomDialogButton[]
}
const props = withDefaults(defineProps<Props & MazDialogProps>(), {
data: undefined,
buttons: undefined,
})
Expand Down

0 comments on commit 3adbb32

Please sign in to comment.