File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/components/animatedModal Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ import { ModalAnimation } from './AnimatedModal.enums';
7
7
/**
8
8
* Animated Modal's props.
9
9
* @interface IAnimatedModalProps
10
- * @property {boolean } [isOpen ] Is modal open?
10
+ * @property {boolean } [startOpen ] Is modal open?
11
11
* @property {ModalAnimation } animation Modal animation
12
12
* @property {React.ReactNode } [children] Modal's children
13
13
* @property {boolean } [closeOnBackgroundClick] Close modal on background click?
14
14
*/
15
15
interface IAnimatedModalProps {
16
- isOpen ?: boolean ;
16
+ startOpen ?: boolean ;
17
17
animation : ModalAnimation ;
18
18
children ?: React . ReactNode ;
19
19
closeOnBackgroundClick ?: boolean ;
@@ -115,11 +115,11 @@ const AnimatedModal = forwardRef(
115
115
}
116
116
117
117
useEffect ( ( ) => {
118
- if ( props . isOpen ) {
118
+ if ( props . startOpen ) {
119
119
setModalClass ( props . animation ) ;
120
120
document . body . classList . add ( 'modal-active' ) ;
121
121
}
122
- } , [ props . isOpen ] ) ;
122
+ } , [ props . startOpen ] ) ;
123
123
124
124
/**
125
125
* Default modal.
@@ -166,7 +166,7 @@ AnimatedModal.displayName = 'AnimatedModal';
166
166
167
167
// Set default props
168
168
AnimatedModal . defaultProps = {
169
- isOpen : false ,
169
+ startOpen : false ,
170
170
animation : ModalAnimation . Unfold ,
171
171
closeOnBackgroundClick : true
172
172
} ;
You can’t perform that action at this time.
0 commit comments