Skip to content

Commit aded87a

Browse files
committed
refactor: move to src folder
1 parent f63acf9 commit aded87a

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "react-native-input-spinner",
33
"version": "1.4.0",
44
"description": "React native input with increase and decrease buttons",
5-
"main": "index.js",
5+
"main": "./src/index.js",
66
"scripts": {
7-
"prettify": "prettier --write '*.{ts,json,md,yml,js}'",
7+
"prettify": "prettier --write './src/*.{ts,json,md,yml,js}'",
88
"test": "echo \"Error: no test specified\" && exit 1"
99
},
1010
"repository": {

index.js renamed to src/InputSpinner.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, {Component} from "react";
22
import {Text, TextInput, TouchableHighlight, View} from "react-native";
33
import PropTypes from "prop-types";
4-
import {Style} from "./style";
5-
import {debounce, isNumeric, isEmpty} from "./utils";
4+
import {Style} from "./Style";
5+
import {debounce, isNumeric, isEmpty} from "./Utils";
66

77
/**
88
* Default constants
@@ -17,17 +17,17 @@ const defaultTypingTime = 500;
1717
* @author Marco Cesarato <[email protected]>
1818
*/
1919
class InputSpinner extends Component {
20-
// Timers
21-
increaseTimer = null;
22-
decreaseTimer = null;
23-
2420
/**
2521
* Constructor
2622
* @param props
2723
*/
2824
constructor(props) {
2925
super(props);
3026

27+
// Timers
28+
this.increaseTimer = null;
29+
this.decreaseTimer = null;
30+
3131
let spinnerStep = this.parseNum(this.props.step);
3232
if (!this.typeDecimal() && spinnerStep < 1) {
3333
spinnerStep = 1;
@@ -1040,4 +1040,4 @@ InputSpinner.defaultProps = {
10401040
rightButtonProps: {},
10411041
};
10421042

1043-
export default InputSpinner;
1043+
export {InputSpinner};
File renamed without changes.
File renamed without changes.

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import InputSpinner from "./InputSpinner";
2+
3+
// Export
4+
export default InputSpinner;

0 commit comments

Comments
 (0)