Fix modal

This commit is contained in:
Jake Howard 2016-02-06 19:23:11 +00:00
parent 48e607b136
commit 0f8f77bad7
2 changed files with 11 additions and 9 deletions

View file

@ -6,6 +6,7 @@ const {
StyleSheet,
Text,
View,
TouchableWithoutFeedback
} = React;
const styles = StyleSheet.create({
@ -38,12 +39,16 @@ const styles = StyleSheet.create({
});
export default class Login extends React.Component {
hide() {
this.refs.modal.close();
}
render() {
return (
<Modal
isOpen={this.props.open}
style={styles.modal}
ref="modal"
onClosed={this.props.onClose}
backdrop={true}>
<View style={styles.modalView}>
<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.
</Text>
</View>
<TouchableWithoutFeedback onPress={this.hide.bind(this)}>
<Text style={[styles.text, styles.dismiss]}>
Swipe down to dismiss
</Text>
</TouchableWithoutFeedback>
</Modal>
);
}

View file

@ -7,7 +7,6 @@ import { set } from '../../api/token';
import loaderHandler from 'react-native-busy-indicator/LoaderHandler';
import BusyIndicator from 'react-native-busy-indicator';
const dismissKeyboard = require('dismissKeyboard');
const {
@ -43,11 +42,6 @@ const styles = StyleSheet.create({
backgroundColor: 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: {
justifyContent: 'center',
alignItems: 'center',
@ -103,6 +97,7 @@ export default class Login extends React.Component {
}
proceed() {
this.hideTokenHelp();
this.props.nav.push(RouteMaster.get('HOME'));
}