mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-31 12:17:54 +01:00
chore(components): random TS errors
This commit is contained in:
@@ -39,7 +39,7 @@ export interface AlertProps {
|
|||||||
* @emits 'update:open'
|
* @emits 'update:open'
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: boolean | Partial<ButtonProps>
|
||||||
/**
|
/**
|
||||||
* The icon displayed in the close button.
|
* The icon displayed in the close button.
|
||||||
* @defaultValue appConfig.ui.icons.close
|
* @defaultValue appConfig.ui.icons.close
|
||||||
@@ -131,7 +131,7 @@ const ui = computed(() => alert({
|
|||||||
color="neutral"
|
color="neutral"
|
||||||
variant="link"
|
variant="link"
|
||||||
:aria-label="t('alert.close')"
|
:aria-label="t('alert.close')"
|
||||||
v-bind="typeof close === 'object' ? close : undefined"
|
v-bind="(typeof close === 'object' ? close as Partial<ButtonProps> : {})"
|
||||||
:class="ui.close({ class: props.ui?.close })"
|
:class="ui.close({ class: props.ui?.close })"
|
||||||
@click="emits('update:open', false)"
|
@click="emits('update:open', false)"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export interface CommandPaletteProps<G, T> extends Pick<ListboxRootProps, 'multi
|
|||||||
* @emits 'update:open'
|
* @emits 'update:open'
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: boolean | Partial<ButtonProps>
|
||||||
/**
|
/**
|
||||||
* The icon displayed in the close button.
|
* The icon displayed in the close button.
|
||||||
* @defaultValue appConfig.ui.icons.close
|
* @defaultValue appConfig.ui.icons.close
|
||||||
@@ -263,7 +263,7 @@ const groups = computed(() => {
|
|||||||
color="neutral"
|
color="neutral"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
:aria-label="t('commandPalette.close')"
|
:aria-label="t('commandPalette.close')"
|
||||||
v-bind="typeof close === 'object' ? close : undefined"
|
v-bind="(typeof close === 'object' ? close as Partial<ButtonProps> : {})"
|
||||||
:class="ui.close({ class: props.ui?.close })"
|
:class="ui.close({ class: props.ui?.close })"
|
||||||
@click="emits('update:open', false)"
|
@click="emits('update:open', false)"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export interface ModalProps extends DialogRootProps {
|
|||||||
* `{ size: 'md', color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
* `{ size: 'md', color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
||||||
* @defaultValue true
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: boolean | Partial<ButtonProps>
|
||||||
/**
|
/**
|
||||||
* The icon displayed in the close button.
|
* The icon displayed in the close button.
|
||||||
* @defaultValue appConfig.ui.icons.close
|
* @defaultValue appConfig.ui.icons.close
|
||||||
@@ -167,7 +167,7 @@ const ui = computed(() => modal({
|
|||||||
color="neutral"
|
color="neutral"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
:aria-label="t('modal.close')"
|
: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 })"
|
:class="ui.close({ class: props.ui?.close })"
|
||||||
/>
|
/>
|
||||||
</slot>
|
</slot>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export interface SlideoverProps extends DialogRootProps {
|
|||||||
* `{ size: 'md', color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
* `{ size: 'md', color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
||||||
* @defaultValue true
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: boolean | Partial<ButtonProps>
|
||||||
/**
|
/**
|
||||||
* The icon displayed in the close button.
|
* The icon displayed in the close button.
|
||||||
* @defaultValue appConfig.ui.icons.close
|
* @defaultValue appConfig.ui.icons.close
|
||||||
@@ -167,7 +167,7 @@ const ui = computed(() => slideover({
|
|||||||
color="neutral"
|
color="neutral"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
:aria-label="t('slideover.close')"
|
:aria-label="t('slideover.close')"
|
||||||
v-bind="typeof close === 'object' ? close : undefined"
|
v-bind="(typeof close === 'object' ? close as Partial<ButtonProps> : {})"
|
||||||
:class="ui.close({ class: props.ui?.close })"
|
:class="ui.close({ class: props.ui?.close })"
|
||||||
/>
|
/>
|
||||||
</slot>
|
</slot>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open'
|
|||||||
* `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts-type"}
|
* `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts-type"}
|
||||||
* @defaultValue true
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
close?: ButtonProps | boolean
|
close?: boolean | Partial<ButtonProps>
|
||||||
/**
|
/**
|
||||||
* The icon displayed in the close button.
|
* The icon displayed in the close button.
|
||||||
* @defaultValue appConfig.ui.icons.close
|
* @defaultValue appConfig.ui.icons.close
|
||||||
@@ -169,7 +169,7 @@ defineExpose({
|
|||||||
color="neutral"
|
color="neutral"
|
||||||
variant="link"
|
variant="link"
|
||||||
:aria-label="t('toast.close')"
|
:aria-label="t('toast.close')"
|
||||||
v-bind="typeof close === 'object' ? close : undefined"
|
v-bind="(typeof close === 'object' ? close as Partial<ButtonProps> : {})"
|
||||||
:class="ui.close({ class: props.ui?.close })"
|
:class="ui.close({ class: props.ui?.close })"
|
||||||
@click.stop
|
@click.stop
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user