From 06f9e533eb323ad9e914fbc2956d78ef7b4fbf05 Mon Sep 17 00:00:00 2001 From: Selemondev Date: Sun, 10 Sep 2023 11:21:38 +0300 Subject: [PATCH] fix(app): alert click prop type This pull request is intended to fix the alert component click prop type to provide a more strict type to the click function that is passed as a prop. --- .../src/components/elements/Alert/UAlert.vue | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/nuxt-ui-vue/src/components/elements/Alert/UAlert.vue b/packages/nuxt-ui-vue/src/components/elements/Alert/UAlert.vue index 19bc1dd..f074c1b 100755 --- a/packages/nuxt-ui-vue/src/components/elements/Alert/UAlert.vue +++ b/packages/nuxt-ui-vue/src/components/elements/Alert/UAlert.vue @@ -37,8 +37,7 @@ const props = defineProps({ default: () => nuxtLabsTheme.UAlert.base.default.closeButton, }, actions: { - // eslint-disable-next-line @typescript-eslint/ban-types - type: Array as PropType<(Button & { click: Function })[]>, + type: Array as PropType<(Button & { click: () => void })[]>, default: () => [], }, color: { @@ -104,7 +103,10 @@ export default defineComponent({