This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
Sphere/app/components/login/token-help.js

73 lines
1.7 KiB
JavaScript
Raw Normal View History

2016-02-02 22:26:55 +00:00
import React from 'react-native';
import GlobalStyles from '../../settings/styles';
import Modal from 'react-native-modalbox';
const {
StyleSheet,
Text,
2016-02-03 19:01:11 +00:00
View,
2016-02-06 19:23:11 +00:00
TouchableWithoutFeedback
2016-02-02 22:26:55 +00:00
} = React;
const styles = StyleSheet.create({
modal: {
justifyContent: 'center',
alignItems: 'center',
2016-02-06 15:49:57 +00:00
backgroundColor: GlobalStyles.get('CIRCLE_NAVBAR_BG'),
2016-02-03 19:01:11 +00:00
height: 200
2016-02-02 22:26:55 +00:00
},
title: {
fontSize: 18,
2016-02-06 15:49:57 +00:00
color: GlobalStyles.get('CIRCLE_NAVBAR_TEXT'),
2016-02-02 22:26:55 +00:00
},
text: {
fontSize: 13,
2016-02-06 15:49:57 +00:00
color: GlobalStyles.get('CIRCLE_NAVBAR_TEXT'),
2016-02-03 19:01:11 +00:00
margin: 2,
textAlign: 'center'
},
dismiss: {
fontSize: 12,
padding: 5
2016-02-02 22:26:55 +00:00
},
modalView: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
2016-02-03 19:01:11 +00:00
padding: 10
2016-02-02 22:26:55 +00:00
}
});
export default class Login extends React.Component {
2016-02-06 19:23:11 +00:00
hide() {
this.refs.modal.close();
}
2016-02-02 22:26:55 +00:00
render() {
return (
<Modal
isOpen={this.props.open}
style={styles.modal}
2016-02-03 19:01:11 +00:00
ref="modal"
2016-02-06 19:23:11 +00:00
onClosed={this.props.onClose}
2016-02-02 22:26:55 +00:00
backdrop={true}>
<View style={styles.modalView}>
<Text style={styles.title}>
What is a token?
</Text>
<Text style={styles.text}>
2016-02-11 19:40:03 +00:00
A token is the identifier used to authenticate with CircleCI and let Sphere interact your account.
2016-02-03 19:01:11 +00:00
</Text>
<Text style={styles.text}>
To generate a new token, visit your CircleCI accounts page.
2016-02-02 22:26:55 +00:00
</Text>
</View>
2016-02-06 19:23:11 +00:00
<TouchableWithoutFeedback onPress={this.hide.bind(this)}>
<Text style={[styles.text, styles.dismiss]}>
Swipe down to dismiss
</Text>
</TouchableWithoutFeedback>
2016-02-02 22:26:55 +00:00
</Modal>
);
}
};