Skip to content

Commit 06599cf

Browse files
Initial commit
0 parents  commit 06599cf

9 files changed

Lines changed: 8880 additions & 0 deletions

File tree

.babelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"presets": [
3+
"react-native"
4+
]
5+
}

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
indent_style = space
6+
indent_size = 2
7+
charset = utf-8

.eslintrc.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 6,
4+
"sourceType": "module",
5+
"ecmaFeatures": {
6+
"jsx": true
7+
}
8+
},
9+
"plugins": [
10+
"react",
11+
"import"
12+
],
13+
"extends" : [
14+
"eslint:recommended",
15+
"plugin:react/recommended"
16+
],
17+
"rules": {
18+
"indent": ["error", 2, { "SwitchCase": 1 }],
19+
"semi": 2,
20+
"quotes": [2, "single", "avoid-escape"],
21+
"prefer-destructuring": [2, {"object": true, "array": false}],
22+
"no-duplicate-imports": [2, { "includeExports": true }],
23+
"nonblock-statement-body-position": 2,
24+
"object-curly-spacing": [2, "always", { "objectsInObjects": true }],
25+
"space-before-blocks": 2,
26+
"comma-style": [2, "last"],
27+
"camelcase": [2, {"properties": "always"}],
28+
"id-length": [2, { "min": 2, "exceptions": ["r", "x", "y"] }],
29+
"space-infix-ops": 2,
30+
"no-console": [2, { "allow": ["warn", "error"] }],
31+
"no-undef": 1,
32+
"no-unused-vars": [2, { "args": "none" }],
33+
"import/extensions": 2,
34+
"import/no-absolute-path": 2,
35+
"import/no-dynamic-require": 2,
36+
"import/no-duplicates": 2,
37+
"import/newline-after-import": 2,
38+
"import/no-unassigned-import": 2,
39+
"import/no-unresolved": [2, { "commonjs": true, "amd": true }],
40+
"react/no-access-state-in-setstate": 2,
41+
"react/no-did-update-set-state": 2,
42+
"react/no-did-mount-set-state": 2,
43+
"react/no-is-mounted": 2,
44+
"react/no-will-update-set-state": 2,
45+
"react/style-prop-object": 2,
46+
"react/no-string-refs": 2,
47+
"react/self-closing-comp": 2,
48+
"react/jsx-closing-bracket-location": 2,
49+
"react/jsx-boolean-value": 2,
50+
"react/no-deprecated": 2,
51+
"react/forbid-prop-types": 0,
52+
"react/prefer-stateless-function": 2,
53+
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
54+
"react/jsx-no-duplicate-props": 2,
55+
"react/prop-types": [1, { "skipUndeclared": true }]
56+
}
57+
}

.gitignore

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
*.log
8+
build/
9+
*.pbxuser
10+
!default.pbxuser
11+
*.mode1v3
12+
!default.mode1v3
13+
*.mode2v3
14+
!default.mode2v3
15+
*.perspectivev3
16+
!default.perspectivev3
17+
xcuserdata
18+
*.xccheckout
19+
*.moved-aside
20+
DerivedData
21+
*.hmap
22+
*.ipa
23+
*.xcuserstate
24+
project.xcworkspace
25+
yarn.lock
26+
!package-lock.json
27+
28+
# Android/IntelliJ
29+
#
30+
build/
31+
.idea
32+
.gradle
33+
local.properties
34+
*.iml
35+
36+
# node.js
37+
#
38+
node_modules/
39+
npm-debug.log
40+
yarn-error.log
41+
42+
# BUCK
43+
buck-out/
44+
\.buckd/
45+
46+
# fastlane
47+
#
48+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
49+
# screenshots whenever they are needed.
50+
# For more information about the recommended setup visit:
51+
# https://docs.fastlane.tools/best-practices/source-control/
52+
53+
*/fastlane/report.xml
54+
*/fastlane/Preview.html
55+
*/fastlane/screenshots

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Lucas Monteiro
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# React Native Speedometer Chart
2+
[![npm version](https://badge.fury.io/js/react-native-speedometer-chart.svg)](https://badge.fury.io/js/react-native-speedometer-chart) [![npm downloads](https://img.shields.io/npm/dt/react-native-speedometer-chart.svg)](https://npm-stat.com/charts.html?package=react-native-speedometer-chart)
3+
[![NPM](https://nodei.co/npm/react-native-speedometer-chart.png?downloads=true)](https://nodei.co/npm/react-native-speedometer-chart/)
4+
---
5+
Speedometer Chart component for React Native
6+
7+
## Installation
8+
9+
```
10+
npm install --save react-native-speedometer-chart
11+
```
12+
```
13+
yarn add react-native-speedometer-chart
14+
```
15+
16+
## Props
17+
| Prop | Default | Type | Required | Description |
18+
| --- | --- | --- | --- | --- |
19+
| value | none | number | yes | Value to be painted |
20+
| off | none | number | yes | Total value |
21+
| internalColor | #2eb82e | string | no | Value color |
22+
| outerColor | #e6e6e6 | string | no | Off color |
23+
| size | 200 | number | no | Chart size |
24+
| style | {} | object | no | Additional style |
25+
26+
## Usage
27+
28+
```javascript
29+
import React, { Component } from 'react';
30+
import Speedometer from 'react-native-speedometer-chart';
31+
32+
export default class Main extends Component {
33+
render() {
34+
return (
35+
<Speedometer value={50} off={100}/>
36+
);
37+
}
38+
}
39+
```
40+
41+
## License
42+
MIT

0 commit comments

Comments
 (0)