@@ -37,8 +37,7 @@ const props = defineProps({
37
37
default : () => nuxtLabsTheme .UAlert .base .default .closeButton ,
38
38
},
39
39
actions: {
40
- // eslint-disable-next-line @typescript-eslint/ban-types
41
- type: Array as PropType <(Button & { click: Function })[]>,
40
+ type: Array as PropType <(Button & { click: () => void })[]>,
42
41
default : () => [],
43
42
},
44
43
color: {
@@ -104,7 +103,10 @@ export default defineComponent({
104
103
105
104
<template >
106
105
<div :class =" alertClass" >
107
- <div class =" flex gap-3" :class =" { 'items-start': (description || $slots.description), 'items-center': !description && !$slots.description }" >
106
+ <div
107
+ class =" flex gap-3"
108
+ :class =" { 'items-start': (description || $slots.description), 'items-center': !description && !$slots.description }"
109
+ >
108
110
<UIcon v-if =" icon" :name =" icon" :class =" variant.iconBase" />
109
111
110
112
<UAvatar v-if =" avatar" v-bind =" { size: variant.avatarSize, ...avatar }" :class =" variant.avatarBase" />
@@ -122,12 +124,18 @@ export default defineComponent({
122
124
</p >
123
125
124
126
<div v-if =" (description || $slots.description) && actions.length" class =" mt-3 flex items-center gap-2" >
125
- <UButton v-for =" (action, index) of actions" :key =" index" v-bind =" { ...nuxtLabsTheme.UAlert.base.default.actionButton, ...action }" @click.stop =" action.click" />
127
+ <UButton
128
+ v-for =" (action, index) of actions" :key =" index"
129
+ v-bind =" { ...nuxtLabsTheme.UAlert.base.default.actionButton, ...action }" @click.stop =" action.click"
130
+ />
126
131
</div >
127
132
</div >
128
133
<div class =" flex-shrink-0 flex items-center gap-3" >
129
134
<div v-if =" !description && !$slots.description && actions.length" class =" flex items-center gap-2" >
130
- <UButton v-for =" (action, index) of actions" :key =" index" v-bind =" { ...nuxtLabsTheme.UAlert.base.default.actionButton, ...action }" @click.stop =" action.click" />
135
+ <UButton
136
+ v-for =" (action, index) of actions" :key =" index"
137
+ v-bind =" { ...nuxtLabsTheme.UAlert.base.default.actionButton, ...action }" @click.stop =" action.click"
138
+ />
131
139
</div >
132
140
<UButton v-if =" closeButton" v-bind =" { closeButtonClass, ...closeButton }" @click.stop =" handleClose" />
133
141
</div >
0 commit comments