I currently have a modal using React Native modalize. The modal is always open at 500 and when I swipe the modal up, it opens to 700. The functionality is currently working.
I am trying to add that when the always open modal at 500 is swiped down, the modal closes to 300.
How can I accomplish such a feature?
Here is my code:
function Screen() {
const modal = React.createRef();
return (
<Modalize
ref={modal}
alwaysOpen={500}
modalHeight={700}
handlePosition="inside"
>
<View style={s.content}>
<Text style={s.content__subheading}>
{'Introduction'.toUpperCase()}
</Text>
<Text style={s.content__heading}>Always open modal!</Text>
<Button
name="Close to initial position"
onPress={() => this.closeModal('alwaysOpen')}
/>
<Button name="Close completely" onPress={this.closeModal} />
</View>
</Modalize>
)
}
export default Screen;