Skip to content

Commit

Permalink
feat(example): adding example
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Carpentier committed Mar 18, 2016
1 parent 7c39462 commit a8aeccb
Show file tree
Hide file tree
Showing 53 changed files with 4,108 additions and 9 deletions.
41 changes: 41 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
root = true

[*]
charset = utf-8
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[**.js]
indent_style = space
indent_size = 2
quote_type = single
space_after_anon_function = true
curly_bracket_next_line = true
brace_style = end-expand

[**.jsx]
indent_style = space
indent_size = 2
quote_type = single
space_after_anon_function = true
curly_bracket_next_line = true
brace_style = end-expand

[**.css]
indent_style = space
indent_size = 4

[**.html]
indent_style = space
indent_size = 4
max_char = 78
brace_style = expand

[node_modules/**.js]
codepaint = false

[*.json]
indent_style = space
indent_size = 2
36 changes: 36 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"rules": {
"indent": [
2,
2,
{"SwitchCase": 1}
],
"quotes": [
2,
"single"
],
"linebreak-style": [
2,
"unix"
],
"semi": [
2,
"always"
]
},
"env": {
"es6": true,
"node": true,
"amd": true
},
"extends": "eslint:recommended",
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true,
"modules": true,
"async": true
},
"plugins": [
"react"
]
}
16 changes: 12 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### Node template
.DS_Store

# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
Expand All @@ -25,5 +25,13 @@ coverage
build/Release

# Dependency directory
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
/node_modules

# Xcode
*.xcuserstate
examples/ios/swiper.xcodeproj/project.xcworkspace/
examples/ios/swiper.xcodeproj/xcuserdata

# IntelliJ
.idea/
13 changes: 13 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
logs
*.log
pids
*.pid
*.seed
lib-cov
coverage
.lock-wscript
build/Release
node_modules
res
examples
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# react-native-country-picker
react-native-country-picker is a custom UIPickerView subclass that provides a modal allowing a user to select a country from a list. It display a flag next to each country name. Public domain flag images from FAMFAMFAM (http://www.famfamfam.com/lab/icons/flags/) that have been painstaki

The best Country Picker for React Native.

## Changelogs

## Getting Started
- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Properties](#properties)
- [Examples](#examples)
- [Development](#development)

### Installation

### Basic Usage

### Properties

### Examples

### Development

```bash
$ npm start
```

## Contribution

- [@xcapentier](mailto:contact@xaviercarpentier.com) The main author.

## Questions

Feel free to [contact me](mailto:contact@xaviercarpentier.com) or [create an issue](https://github.com/leecade/react-native-swiper/issues/new)

> made with ♥
1 change: 1 addition & 0 deletions dist/CountryFlags.js

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions dist/Ratio.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
'use strict';

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var dimension = require('Dimensions').get('window');

var Ratio = function () {
function Ratio() {
_classCallCheck(this, Ratio);
}

_createClass(Ratio, [{
key: 'getWidthPercent',
value: function getWidthPercent(percentage) {
return dimension.width * percentage / 100;
}
}, {
key: 'getHeightPercent',
value: function getHeightPercent(percentage) {
return dimension.height * percentage / 100;
}
}, {
key: 'getPercent',
value: function getPercent(percentage) {
return (dimension.height + dimension.width) / 2 * percentage / 100;
}
}]);

return Ratio;
}();

module.exports = new Ratio();

0 comments on commit a8aeccb

Please sign in to comment.