File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export interface CToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title
50
50
/**
51
51
* Method called before the dissmiss animation has started.
52
52
*/
53
- onDismiss ?: ( index : number | null ) => void
53
+ onClose ?: ( index : number | null ) => void
54
54
}
55
55
56
56
interface ContextProps extends CToastProps {
@@ -72,7 +72,7 @@ export const CToast = forwardRef<HTMLDivElement, CToastProps>(
72
72
index,
73
73
key,
74
74
visible = false ,
75
- onDismiss ,
75
+ onClose ,
76
76
...rest
77
77
} ,
78
78
ref ,
@@ -129,7 +129,7 @@ export const CToast = forwardRef<HTMLDivElement, CToastProps>(
129
129
< CSSTransition
130
130
in = { _visible }
131
131
timeout = { 250 }
132
- onExited = { ( ) => onDismiss && onDismiss ( index ? index : null ) }
132
+ onExited = { ( ) => onClose && onClose ( index ? index : null ) }
133
133
unmountOnExit
134
134
>
135
135
{ ( state ) => {
@@ -166,7 +166,7 @@ CToast.propTypes = {
166
166
delay : PropTypes . number ,
167
167
index : PropTypes . number ,
168
168
key : PropTypes . number ,
169
- onDismiss : PropTypes . func ,
169
+ onClose : PropTypes . func ,
170
170
visible : PropTypes . bool ,
171
171
}
172
172
You can’t perform that action at this time.
0 commit comments