Skip to content

Commit c07a7e5

Browse files
initial commit
0 parents  commit c07a7e5

File tree

6 files changed

+156
-0
lines changed

6 files changed

+156
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.autogit

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) 2020 Ifechukwu Daniel
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.

contribution.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Contribution
2+
Making contributions is really simple just follow the guidline below;
3+
4+
- Fork this project.
5+
- Each new feature must be a new PR.
6+
- Explain exactly what your PR is soppose to do.
7+
and that's it, your PR will be merged! thank in advance, lets make this awesome :)

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import ScrollMonthCalender from './components/ScrollMonthCalender'
2+
3+
export {ScrollMonthCalender};

package.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "react-native-number-view",
3+
"version": "0.0.1",
4+
"description": "A simple React Native scroll calender for Months ",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/react-native-nigeria/react-native-number-view.git"
12+
},
13+
"keywords": [
14+
"react-native-scroll-month-calender ",
15+
"react",
16+
"react-native",
17+
"month-calender",
18+
"scroll-month-calender"
19+
],
20+
"author": "Ifechuwku daniel",
21+
"license": "MIT",
22+
"bugs": {
23+
"url": "https://github.com/react-native-nigeria/react-native-number-view/issues"
24+
},
25+
"homepage": "https://github.com/react-native-nigeria/react-native-number-view#readme"
26+
}

readme.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# **React Native Number View**
2+
3+
<img src="img/img1.png" alt="image1" style="" />
4+
5+
![image1](img/img2.png)
6+
7+
<img src="img/img3.png" alt="image1" style="" />
8+
9+
This is a simple React Native number counter component.
10+
11+
12+
13+
### Installation
14+
15+
Add react-native-number-view to your project by executing
16+
17+
```
18+
$ npm install react-native-number-view
19+
or
20+
$ yarn add react-native-number-view
21+
```
22+
23+
24+
25+
> and that's it, you're all good to go!
26+
27+
28+
29+
### Usage
30+
31+
```javascript
32+
/**
33+
* Sample React Native App
34+
* https://github.com/facebook/react-native
35+
*
36+
* @format
37+
* @flow
38+
*/
39+
40+
import React, {Component} from 'react';
41+
import {View} from 'react-native';
42+
import {NumberView} from 'react-native-number-view'
43+
44+
type Props = {};
45+
export default class App extends Component<Props> {
46+
render() {
47+
return (
48+
<View style={styles.container}>
49+
<NumberView
50+
enableDefaultStyles={true}
51+
themeColor="#3F6D2A"
52+
leftContent={<Text>😔</Text>}
53+
rightContent={<Text>😃</Text>}
54+
onValueChange={(newVal)=>{alert(newVal)}}
55+
onDecrement={()=>{alert('decremented')}}
56+
onIncrement={()=>{alert('Incremented')}}
57+
/>
58+
</View>
59+
);
60+
}
61+
}
62+
63+
```
64+
65+
66+
67+
68+
69+
## API's
70+
71+
| Name | Use | Default Values |
72+
| ----------------------------- | ------------------------------------------ | -------------- |
73+
| leftContent | Content to be displayed on the left | None |
74+
| rightContent | Content to be displayed on the Right | None |
75+
| onValueChange | Callback which return new value | None |
76+
| onDecrement | callback each time value is decremented | None |
77+
| onIncrement | callback each time value is incremented | None |
78+
| themeColor | Use to set a theme color(only accepts HEX) | none |
79+
| enableDefaultStyles (boolean) | enable or disable preset styles | True |
80+
| initialValue | counters initial value | 0 |
81+
| | | |
82+
83+
84+
85+
## Contributions
86+
87+
What to help make this package even more awesome? [Read how to contribute](https://github.com/react-native-nigeria/react-native-number-view/blob/master/contribution.md)
88+
89+
90+
91+
## Licensing
92+
93+
This project is licensed under MIT license.
94+
95+
96+
97+
### Don't forget to star, like and share :)
98+

0 commit comments

Comments
 (0)