(props: ModalProps)
| 208 | interactionHandle: OrNull<number> = null; |
| 209 | |
| 210 | constructor(props: ModalProps) { |
| 211 | super(props); |
| 212 | const {animationIn, animationOut} = buildAnimations( |
| 213 | extractAnimationFromProps(props), |
| 214 | ); |
| 215 | |
| 216 | this.animationIn = animationIn; |
| 217 | this.animationOut = animationOut; |
| 218 | |
| 219 | if (this.state.isSwipeable) { |
| 220 | this.state = { |
| 221 | ...this.state, |
| 222 | pan: new Animated.ValueXY(), |
| 223 | }; |
| 224 | this.buildPanResponder(); |
| 225 | } |
| 226 | if (props.isVisible) { |
| 227 | this.state = { |
| 228 | ...this.state, |
| 229 | isVisible: true, |
| 230 | showContent: true, |
| 231 | }; |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | static getDerivedStateFromProps(nextProps: Readonly<ModalProps>, state: State) { |
| 236 | if (!state.isVisible && nextProps.isVisible) { |
nothing calls this directly
no test coverage detected