Fix modal
This commit is contained in:
parent
48e607b136
commit
0f8f77bad7
2 changed files with 11 additions and 9 deletions
|
@ -6,6 +6,7 @@ const {
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
|
TouchableWithoutFeedback
|
||||||
} = React;
|
} = React;
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
|
@ -38,12 +39,16 @@ const styles = StyleSheet.create({
|
||||||
});
|
});
|
||||||
|
|
||||||
export default class Login extends React.Component {
|
export default class Login extends React.Component {
|
||||||
|
hide() {
|
||||||
|
this.refs.modal.close();
|
||||||
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
isOpen={this.props.open}
|
isOpen={this.props.open}
|
||||||
style={styles.modal}
|
style={styles.modal}
|
||||||
ref="modal"
|
ref="modal"
|
||||||
|
onClosed={this.props.onClose}
|
||||||
backdrop={true}>
|
backdrop={true}>
|
||||||
<View style={styles.modalView}>
|
<View style={styles.modalView}>
|
||||||
<Text style={styles.title}>
|
<Text style={styles.title}>
|
||||||
|
@ -56,9 +61,11 @@ export default class Login extends React.Component {
|
||||||
To generate a new token, visit your CircleCI accounts page.
|
To generate a new token, visit your CircleCI accounts page.
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
<TouchableWithoutFeedback onPress={this.hide.bind(this)}>
|
||||||
<Text style={[styles.text, styles.dismiss]}>
|
<Text style={[styles.text, styles.dismiss]}>
|
||||||
Swipe down to dismiss
|
Swipe down to dismiss
|
||||||
</Text>
|
</Text>
|
||||||
|
</TouchableWithoutFeedback>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@ import { set } from '../../api/token';
|
||||||
import loaderHandler from 'react-native-busy-indicator/LoaderHandler';
|
import loaderHandler from 'react-native-busy-indicator/LoaderHandler';
|
||||||
import BusyIndicator from 'react-native-busy-indicator';
|
import BusyIndicator from 'react-native-busy-indicator';
|
||||||
|
|
||||||
|
|
||||||
const dismissKeyboard = require('dismissKeyboard');
|
const dismissKeyboard = require('dismissKeyboard');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
@ -43,11 +42,6 @@ const styles = StyleSheet.create({
|
||||||
backgroundColor: GlobalStyles.get('CIRCLE_GREEN'),
|
backgroundColor: GlobalStyles.get('CIRCLE_GREEN'),
|
||||||
borderColor: GlobalStyles.get('CIRCLE_GREEN'),
|
borderColor: GlobalStyles.get('CIRCLE_GREEN'),
|
||||||
},
|
},
|
||||||
infoButton: {
|
|
||||||
flex: 0.08,
|
|
||||||
backgroundColor: GlobalStyles.get('CIRCLE_NAVBAR_BG'),
|
|
||||||
borderColor: GlobalStyles.get('CIRCLE_NAVBAR_BG'),
|
|
||||||
},
|
|
||||||
button: {
|
button: {
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
@ -103,6 +97,7 @@ export default class Login extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
proceed() {
|
proceed() {
|
||||||
|
this.hideTokenHelp();
|
||||||
this.props.nav.push(RouteMaster.get('HOME'));
|
this.props.nav.push(RouteMaster.get('HOME'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue