File tree 3 files changed +4
-4
lines changed
playground/app/pages/components
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ function addToast() {
98
98
add ({
99
99
id ,
100
100
... template ,
101
- click (toast ) {
101
+ onClick (toast ) {
102
102
console .log (` Toast ${toast .id } clicked ` )
103
103
}
104
104
})
Original file line number Diff line number Diff line change @@ -121,10 +121,10 @@ function getOffset(index: number) {
121
121
'--transform': 'translateY(var(--translate)) scale(var(--scale))'
122
122
}"
123
123
:class =" [ui.base(), {
124
- 'cursor-pointer': !!toast.click
124
+ 'cursor-pointer': !!toast.onClick
125
125
}]"
126
126
@update:open =" onUpdateOpen($event, toast.id)"
127
- @click =" toast.click && toast.click (toast)"
127
+ @click =" toast.onClick && toast.onClick (toast)"
128
128
/>
129
129
130
130
<ToastPortal :disabled =" !portal" >
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import type { ToastProps } from '../types'
4
4
5
5
export interface Toast extends Omit < ToastProps , 'defaultOpen' > {
6
6
id : string | number
7
- click ?: ( toast : Toast ) => void
7
+ onClick ?: ( toast : Toast ) => void
8
8
}
9
9
10
10
export function useToast ( ) {
You can’t perform that action at this time.
0 commit comments