mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 15:01:46 +01:00
chore(Notification): improve types
This commit is contained in:
2
src/runtime/types/index.d.ts
vendored
2
src/runtime/types/index.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
export * from './avatar'
|
||||
export * from './clipboard'
|
||||
export * from './command-palette'
|
||||
export * from './notification'
|
||||
export * from './popper'
|
||||
export * from './toast'
|
||||
|
||||
23
src/runtime/types/notification.d.ts
vendored
Normal file
23
src/runtime/types/notification.d.ts
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { Avatar } from './avatar'
|
||||
import type { Button } from './button'
|
||||
import appConfig from '#build/app.config'
|
||||
|
||||
export interface NotificationAction extends Partial<Button> {
|
||||
click: Function
|
||||
}
|
||||
|
||||
export interface Notification {
|
||||
id: string
|
||||
title: string
|
||||
description: string
|
||||
icon?: string
|
||||
avatar?: Partial<Avatar>
|
||||
close?: Partial<Button>
|
||||
timeout: number
|
||||
actions?: NotificationAction[]
|
||||
click?: Function
|
||||
callback?: Function
|
||||
progressColor?: string
|
||||
progressVariant?: string
|
||||
ui?: Partial<typeof appConfig.ui.notification>
|
||||
}
|
||||
17
src/runtime/types/toast.d.ts
vendored
17
src/runtime/types/toast.d.ts
vendored
@@ -1,17 +0,0 @@
|
||||
import type { Button } from './button'
|
||||
|
||||
export interface ToastNotificationAction extends Partial<Button> {
|
||||
click: Function
|
||||
}
|
||||
|
||||
export interface ToastNotification {
|
||||
id: string
|
||||
title: string
|
||||
description: string
|
||||
type: string
|
||||
icon?: string
|
||||
timeout: number
|
||||
actions?: ToastNotificationAction[]
|
||||
click?: Function
|
||||
callback?: Function
|
||||
}
|
||||
Reference in New Issue
Block a user