Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,684 changes: 5,684 additions & 0 deletions example/package-lock.json

Large diffs are not rendered by default.

9,070 changes: 9,070 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.16.1",
"license": "BSD-3-Clause",
"author": "Alexander Nazarov <[email protected]>",

"description": "Material textfield",
"keywords": [
"react",
Expand All @@ -19,24 +18,25 @@
"floating",
"label"
],

"main": "index.js",
"files": ["index.js", "src/*", "license.txt", "readme.md", "changelog.md"],

"files": [
"index.js",
"src/*",
"license.txt",
"readme.md",
"changelog.md"
],
"repository": {
"type": "git",
"url": "git://github.com/n4kz/react-native-material-textfield.git"
},

"dependencies": {
"prop-types": "^15.5.9"
},

"peerDependencies": {
"react": ">=16.3.0",
"react-native": ">=0.55.0"
},

"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/runtime": "^7.5.5",
Expand All @@ -51,15 +51,15 @@
"react-native": "0.61.2",
"react-test-renderer": "16.10.2"
},

"scripts": {
"test": "eslint index.js src && jest --silent",
"lint": "eslint index.js src example/app.js",
"jest": "jest"
},

"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": ["<rootDir>/example"]
"modulePathIgnorePatterns": [
"<rootDir>/example"
]
}
}
}
4 changes: 2 additions & 2 deletions src/components/affix/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import { Animated } from 'react-native';
import { Text, Animated } from 'react-native';

import styles from './styles';

Expand All @@ -11,7 +11,7 @@ export default class Affix extends PureComponent {

static propTypes = {
numberOfLines: PropTypes.number,
style: Animated.Text.propTypes.style,
style: Text.propType,

color: PropTypes.string.isRequired,
fontSize: PropTypes.number.isRequired,
Expand Down
1 change: 1 addition & 0 deletions src/components/field/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ export default class TextField extends PureComponent {
let options = {
toValue: this.focusState(),
duration,
useNativeDriver: false
};

startAnimation(focusAnimation, options, this.onFocusAnimationEnd);
Expand Down
12 changes: 6 additions & 6 deletions src/components/helper/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import { Animated } from 'react-native';
import { Text, Animated } from 'react-native';

import styles from './styles';

Expand All @@ -11,7 +11,7 @@ export default class Helper extends PureComponent {

disabled: PropTypes.bool,

style: Animated.Text.propTypes.style,
style: PropTypes.any,

baseColor: PropTypes.string,
errorColor: PropTypes.string,
Expand Down Expand Up @@ -72,8 +72,8 @@ export default class Helper extends PureComponent {
errorColor,
} = this.props;

let text = errored?
error:
let text = errored ?
error :
title;

if (null == text) {
Expand All @@ -83,8 +83,8 @@ export default class Helper extends PureComponent {
let textStyle = {
opacity,

color: !disabled && errored?
errorColor:
color: !disabled && errored ?
errorColor :
baseColor,
};

Expand Down
12 changes: 6 additions & 6 deletions src/components/label/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import { Animated } from 'react-native';
import { Text, Animated } from 'react-native';

import styles from './styles';

Expand Down Expand Up @@ -43,7 +43,7 @@ export default class Label extends PureComponent {
y1: PropTypes.number,
}),

style: Animated.Text.propTypes.style,
style: PropTypes.any,
label: PropTypes.string,
};

Expand All @@ -69,10 +69,10 @@ export default class Label extends PureComponent {
return null;
}

let color = disabled?
baseColor:
restricted?
errorColor:
let color = disabled ?
baseColor :
restricted ?
errorColor :
focusAnimation.interpolate({
inputRange: [-1, 0, 1],
outputRange: [errorColor, baseColor, tintColor],
Expand Down