Skip to content

Commit

Permalink
fga-eps-mds#166 - MINOR: Styles enhancements; Minor Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusoliveira30 committed May 22, 2018
1 parent 02e5475 commit 6f9a7c9
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 73 deletions.
14 changes: 7 additions & 7 deletions __tests__/screens/RegisterScreen.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import React from 'react';
import Enzyme, { shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import configureStore from 'redux-mock-store';
import { TouchableOpacity, TextInput, ActivityIndicator, Picker } from 'react-native';
import { TouchableOpacity, /* TextInput, */ ActivityIndicator, Picker } from 'react-native';
// imported as a connected component!
import RegisterScreenContainer from '../../src/Containers/RegisterScreenContainer';
import RegisterScreen from '../../src/screens/RegisterScreen';
import CpfField from '../../src/components/CpfField';
import NameField from '../../src/components/NameField';
import GenericField from '../../src/components/GenericField';
import EmailField from '../../src/components/EmailField';
import PasswordField from '../../src/components/PasswordField';
import PhoneField from '../../src/components/PhoneField';
// import CpfField from '../../src/components/CpfField';
// import NameField from '../../src/components/NameField';
// import GenericField from '../../src/components/GenericField';
// import EmailField from '../../src/components/EmailField';
// import PasswordField from '../../src/components/PasswordField';
// import PhoneField from '../../src/components/PhoneField';
import DropdownComponent from '../../src/components/DropdownComponent';
import ButtonWithActivityIndicator from '../../src/components/ButtonWithActivityIndicator';

Expand Down
66 changes: 66 additions & 0 deletions src/Styles/RegisterStyles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { StyleSheet } from 'react-native';

const styles = StyleSheet.create({
principal: {
flex: 1,
backgroundColor: 'white',
},

content: {
flex: 6,
marginTop: 8,
},

footer: {
flex: 0.5,
borderTopColor: '#a9a9a9',
borderTopWidth: 1,
justifyContent: 'center',
alignItems: 'center',
},

icon: {
marginRight: 6,
},

InputFieldStyle: {
padding: 8,
marginTop: 1,
backgroundColor: '#FAFAFA',
flexDirection: 'row',
justifyContent: 'flex-start',
alignItems: 'center',
borderRadius: 7,
marginBottom: 10,
borderWidth: 1,
borderColor: 'gray',
},

InputFieldDropdown: {
marginTop: 1,
borderColor: 'gray',
borderWidth: 1,
borderRadius: 7,
marginBottom: 10,
},

InputStyle: {
flex: 1,
},

buttonContainer: {
paddingVertical: 14,
marginVertical: 20,
borderRadius: 8,
borderWidth: 1,
alignItems: 'center',
backgroundColor: '#FF9500',
},

buttonText: {
color: 'white',
fontSize: 18,
},
});

export default styles;
68 changes: 2 additions & 66 deletions src/screens/RegisterScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import PropTypes from 'prop-types';
import {
Text,
StyleSheet,
ScrollView,
View,
TouchableOpacity,
Expand Down Expand Up @@ -34,75 +33,12 @@ import DropdownComponent from '../components/DropdownComponent';
import MunicipalDistrict from '../components/MunicipalDistrict';
import ButtonWithActivityIndicator from '../components/ButtonWithActivityIndicator';
import { backHandlerPop } from '../NavigationFunctions';

import styles from '../Styles/RegisterStyles';
import regex from '../../src/RegexList';

const FILE_NAME = 'RegisterScreen.js';

const styles = StyleSheet.create({

principal: {
flex: 1,
backgroundColor: 'white',
},

content: {
flex: 6,
marginTop: 8,
},

footer: {
flex: 0.5,
borderTopColor: '#a9a9a9',
borderTopWidth: 1,
justifyContent: 'center',
alignItems: 'center',
},

icon: {
marginRight: 6,
},

InputFieldStyle: {
padding: 8,
marginTop: 1,
backgroundColor: '#FAFAFA',
flexDirection: 'row',
justifyContent: 'flex-start',
alignItems: 'center',
borderRadius: 7,
marginBottom: 10,
borderWidth: 1,
borderColor: 'gray',
},

InputFieldDropdown: {
marginTop: 1,
borderColor: 'gray',
borderWidth: 1,
borderRadius: 7,
marginBottom: 10,
},

InputStyle: {
flex: 1,
},

buttonContainer: {
paddingVertical: 14,
marginVertical: 20,
borderRadius: 8,
borderWidth: 1,
alignItems: 'center',
backgroundColor: '#FF9500',
},

buttonText: {
color: 'white',
fontSize: 18,
},

});

const UfInitials = (CAE_UF) => {
if (CAE_UF !== '') {
return CAE_UF.substr(0, 2);
Expand Down

0 comments on commit 6f9a7c9

Please sign in to comment.