@@ -47,7 +47,7 @@ export interface CModalProps extends HTMLAttributes<HTMLDivElement> {
4747 /**
4848 * Method called before the dissmiss animation has started.
4949 */
50- onDismiss ?: ( ) => void
50+ onClose ?: ( ) => void
5151 /**
5252 * Generates modal using createPortal.
5353 */
@@ -87,7 +87,7 @@ export const CModal = forwardRef<HTMLDivElement, CModalProps>(
8787 duration = 150 ,
8888 fullscreen,
8989 keyboard = true ,
90- onDismiss ,
90+ onClose ,
9191 portal = true ,
9292 scrollable,
9393 size,
@@ -115,7 +115,7 @@ export const CModal = forwardRef<HTMLDivElement, CModalProps>(
115115 if ( backdrop === 'static' ) {
116116 return setStaticBackdrop ( true )
117117 }
118- return onDismiss && onDismiss ( )
118+ return onClose && onClose ( )
119119 }
120120
121121 useLayoutEffect ( ( ) => {
@@ -194,7 +194,7 @@ export const CModal = forwardRef<HTMLDivElement, CModalProps>(
194194 < CSSTransition
195195 in = { _visible }
196196 timeout = { ! transition ? 0 : duration }
197- onExit = { onDismiss }
197+ onExit = { onClose }
198198 mountOnEnter
199199 unmountOnExit
200200 >
@@ -225,7 +225,7 @@ CModal.propTypes = {
225225 PropTypes . oneOf < 'sm' | 'md' | 'lg' | 'xl' | 'xxl' > ( [ 'sm' , 'md' , 'lg' , 'xl' , 'xxl' ] ) ,
226226 ] ) ,
227227 keyboard : PropTypes . bool ,
228- onDismiss : PropTypes . func ,
228+ onClose : PropTypes . func ,
229229 portal : PropTypes . bool ,
230230 scrollable : PropTypes . bool ,
231231 size : PropTypes . oneOf ( [ 'sm' , 'lg' , 'xl' ] ) ,
0 commit comments