@@ -47,7 +47,7 @@ export interface CModalProps extends HTMLAttributes<HTMLDivElement> {
47
47
/**
48
48
* Method called before the dissmiss animation has started.
49
49
*/
50
- onDismiss ?: ( ) => void
50
+ onClose ?: ( ) => void
51
51
/**
52
52
* Generates modal using createPortal.
53
53
*/
@@ -87,7 +87,7 @@ export const CModal = forwardRef<HTMLDivElement, CModalProps>(
87
87
duration = 150 ,
88
88
fullscreen,
89
89
keyboard = true ,
90
- onDismiss ,
90
+ onClose ,
91
91
portal = true ,
92
92
scrollable,
93
93
size,
@@ -115,7 +115,7 @@ export const CModal = forwardRef<HTMLDivElement, CModalProps>(
115
115
if ( backdrop === 'static' ) {
116
116
return setStaticBackdrop ( true )
117
117
}
118
- return onDismiss && onDismiss ( )
118
+ return onClose && onClose ( )
119
119
}
120
120
121
121
useLayoutEffect ( ( ) => {
@@ -194,7 +194,7 @@ export const CModal = forwardRef<HTMLDivElement, CModalProps>(
194
194
< CSSTransition
195
195
in = { _visible }
196
196
timeout = { ! transition ? 0 : duration }
197
- onExit = { onDismiss }
197
+ onExit = { onClose }
198
198
mountOnEnter
199
199
unmountOnExit
200
200
>
@@ -225,7 +225,7 @@ CModal.propTypes = {
225
225
PropTypes . oneOf < 'sm' | 'md' | 'lg' | 'xl' | 'xxl' > ( [ 'sm' , 'md' , 'lg' , 'xl' , 'xxl' ] ) ,
226
226
] ) ,
227
227
keyboard : PropTypes . bool ,
228
- onDismiss : PropTypes . func ,
228
+ onClose : PropTypes . func ,
229
229
portal : PropTypes . bool ,
230
230
scrollable : PropTypes . bool ,
231
231
size : PropTypes . oneOf ( [ 'sm' , 'lg' , 'xl' ] ) ,
0 commit comments