chore(components): random TS errors

This commit is contained in:
Benjamin Canac
2025-02-20 16:17:16 +01:00
parent 5f42d5df3a
commit b27c0f44f5
5 changed files with 10 additions and 10 deletions

View File

@@ -41,7 +41,7 @@ export interface ModalProps extends DialogRootProps {
* `{ size: 'md', color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
* @defaultValue true
*/
close?: ButtonProps | boolean
close?: boolean | Partial<ButtonProps>
/**
* The icon displayed in the close button.
* @defaultValue appConfig.ui.icons.close
@@ -167,7 +167,7 @@ const ui = computed(() => modal({
color="neutral"
variant="ghost"
:aria-label="t('modal.close')"
v-bind="typeof close === 'object' ? close : undefined"
v-bind="(typeof close === 'object' ? close as Partial<ButtonProps> : {})"
:class="ui.close({ class: props.ui?.close })"
/>
</slot>