mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 23:11:43 +01:00
chore(Toaster): missing slots definition
This commit is contained in:
@@ -19,6 +19,10 @@ export interface ToasterProps extends Omit<ToastProviderProps, 'swipeDirection'>
|
||||
ui?: Partial<typeof toaster.slots>
|
||||
}
|
||||
|
||||
export interface ToasterSlots {
|
||||
default(): any
|
||||
}
|
||||
|
||||
export type ToasterContext = ComputedRef<{
|
||||
duration: number
|
||||
}>
|
||||
@@ -32,7 +36,11 @@ import { useToast } from '#imports'
|
||||
import { UToast } from '#components'
|
||||
import { omit } from '#ui/utils'
|
||||
|
||||
const props = withDefaults(defineProps<ToasterProps>(), { expand: true, duration: 5000 })
|
||||
const props = withDefaults(defineProps<ToasterProps>(), {
|
||||
expand: true,
|
||||
duration: 5000
|
||||
})
|
||||
defineSlots<ToasterSlots>()
|
||||
|
||||
const providerProps = useForwardProps(reactivePick(props, 'duration', 'label', 'swipeThreshold'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user