I need to open a modal through the right button in the header and I am able to do it.The problem is The modal should be 3/4 of the page's width and the rest 1/4 of the previous page should be visible.
StackNavigator code is below
FilterOptions: {
screen: FilterOptions,
transparentCard: true,
navigationOptions: {
headerMode: "none",
header: null,
modal: "modal",
transparentCard: true,
}, cardStyle: {
backgroundColor: "transparent",
opacity: 1
}
}
FilterOptions Page code is
import React, { Component } from 'react';
import { Modal, Text, TouchableHighlight, View } from 'react-native';
class ModalExample extends Component {
render() {
return (
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'flex-end', backgroundColor: "transparent" }}>
<View style={{ height: "100%", width: '70%', backgroundColor: "#fff", justifyContent: "center" }}>
<Text>Testing a modal with transparent background</Text>
</View>
</View>
);
}
}
export default ModalExample
Can anyone help to do this.