Skip to content

Commit

Permalink
feat(example): better font style
Browse files Browse the repository at this point in the history
  • Loading branch information
xcarpentier committed Jul 20, 2016
1 parent 0f2a5fc commit a001bab
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 28 deletions.
11 changes: 6 additions & 5 deletions examples/Example.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Sample React Native Country Picker Example App
* https://github.com/xcarpentier/react-native-country-picker
*/
'use strict';
import React, { Component } from 'react';
import {
StyleSheet,
Expand All @@ -26,7 +25,7 @@ export default class Example extends Component {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to Country Picker !!
Welcome to Country Picker!
</Text>
<CountryPicker
onChange={(value)=> this.setState({country: value, cca2: value.cca2})}
Expand Down Expand Up @@ -54,12 +53,14 @@ const styles = StyleSheet.create({
alignItems: 'center'
},
welcome: {
fontSize: 40,
fontSize: 25,
fontWeight: 'bold',
textAlign: 'center',
margin: 10
margin: 10,
marginBottom: 25,
},
instructions: {
fontSize: 12,
fontSize: 20,
textAlign: 'center',
color: '#888',
marginBottom: 5
Expand Down
10 changes: 1 addition & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-country-picker-modal",
"version": "0.1.5",
"version": "0.1.6",
"description": "Country picker",
"main": "src/CountryPicker.js",
"repository": {
Expand All @@ -20,14 +20,6 @@
"url": "https://github.com/xcarpentier/react-native-country-picker-modal/issues"
},
"homepage": "https://github.com/xcarpentier/react-native-country-picker-modal#readme",
"devDependencies": {
"cz-conventional-changelog": "1.1.6"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"dependencies": {
"lodash": "4.12.0",
"world-countries": "1.7.8"
Expand Down
21 changes: 7 additions & 14 deletions src/CountryPicker.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
'use strict';

/**
* react-native-country-picker
* @author xcarpentier<contact@xaviercarpentier.com>
* @flow
*/

import React, { Component } from 'react';
import {
StyleSheet,
View,
PixelRatio,
Image,
TouchableOpacity,
Modal,
Text,
ListView
import { StyleSheet, View, PixelRatio, Image, TouchableOpacity, Modal,
Text, ListView,
} from 'react-native';
import countries from 'world-countries';
import _ from 'lodash';

import CountryFlags from './countryFlags';
import {getWidthPercent, getHeightPercent, getPercent} from './ratio';
import { getWidthPercent, getHeightPercent, getPercent } from './ratio';
import CloseButton from './CloseButton';

class CountryPicker extends Component {
Expand Down Expand Up @@ -264,10 +256,11 @@ CountryPicker.propTypes = {
cca2: React.PropTypes.string.isRequired,
translation: React.PropTypes.string,
onChange: React.PropTypes.func.isRequired,
closeable: React.PropTypes.bool
closeable: React.PropTypes.bool,
};

CountryPicker.defaultProps = {
translation: 'eng'
translation: 'eng',
};

module.exports = CountryPicker;

0 comments on commit a001bab

Please sign in to comment.