Skip to content

Commit 41e1990

Browse files
author
Dhaval Rajani
committed
# Conflicts: # package.json
2 parents 00c30a6 + e20a7ef commit 41e1990

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# dependencies
22
node_modules/
3-
.idea/
4-
dist/
3+
.idea/

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
```npm install react-floating-label-paper-input --save```
55

66
## Demo
7-
Coming Soon
7+
[Demo](http://react-floating-label-paper-input.surge.sh/)
88

99
### Properties
1010

@@ -35,7 +35,7 @@ If you are passing `type="select"` then this options need to pass a props to dis
3535

3636
```
3737
import React,{Component} from "react"
38-
import FloatingLabel from "react-floating-label-paper-input"
38+
import FloatingLabelInput from "react-floating-label-paper-input";
3939
4040
class FloatingLabelTextExample extends Component{
4141
constructor(props){
@@ -59,7 +59,7 @@ class FloatingLabelTextExample extends Component{
5959
});
6060
}
6161
render(){
62-
retuen(
62+
return(
6363
<FloatingLabelInput type={"text"} labelName={"firstname"} onChange={(e) => {e.preventDefault();this.handleForm("firstname", e.currentTarget.value)}} name={"firstname"} value={this.state.formData.firstname ? this.state.formData.firstname : ""} isValid={this.isValid('firstname')} errorMessage={this.getValidationMessages('firstname')} />
6464
)
6565
}
@@ -71,7 +71,7 @@ export default FloatingLabelTextExample;
7171
#### For more info about props using inputMask [InputMask](https://github.com/sanniassin/react-input-mask)
7272
```
7373
import React,{Component} from "react"
74-
import FloatingLabel from "react-floating-label-paper-input"
74+
import FloatingLabelInput from "react-floating-label-paper-input";
7575
7676
class FloatingLabelInputMaskExample extends Component{
7777
constructor(props){
@@ -105,7 +105,7 @@ export default FloatingLabelInputMaskExample;
105105
## Example `type=select`
106106
```
107107
import React,{Component} from "react"
108-
import FloatingLabel from "react-floating-label-paper-input"
108+
import FloatingLabelInput from "react-floating-label-paper-input";
109109
110110
class FloatingLabelInputMaskExample extends Component{
111111
constructor(props){

_config.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

build/webpack.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ config.module.rules.push({
7373
});
7474
config.module.rules.push({
7575
test: /\.scss$/,
76-
loaders: ["style-loader", "css-loader", 'resolve-url-loader', "sass-loader"]
76+
loaders: ["style-loader","css-loader", 'resolve-url-loader', "sass-loader"]
7777
});
7878
config.module.rules.push({
7979
test: /\.sass$/,
80-
loaders: ["style-loader", "css-loader", 'resolve-url-loader', "sass-loader"]
80+
loaders: ["style-loader","css-loader", 'resolve-url-loader', "sass-loader"]
8181
});
8282

8383
config.module.rules.push({
@@ -136,7 +136,7 @@ if (__DEV__) {
136136
}
137137

138138

139-
/*if (__PROD__) {
139+
if (__PROD__) {
140140
config.plugins.push(
141141
new webpack.LoaderOptionsPlugin({
142142
minimize: true,
@@ -159,5 +159,5 @@ if (__DEV__) {
159159
},
160160
})
161161
)
162-
}*/
162+
}
163163
module.exports = config

dist/index.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-floating-label-paper-input",
33
"description": "Material design floating label paper input",
4-
"version": "0.4.0",
4+
"version": "1.0.2",
55
"license": "MIT",
66
"author": "Dhaval Rajani <dhaval.rajani92@gmail.com>",
77
"keywords": [

src/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import "babel-polyfill";
21
import React, { Component } from "react";
32
import Immutable from "immutable";
43
import InputMask from 'react-input-mask';
@@ -105,13 +104,13 @@ class FloatingLabelInput extends Component {
105104
} else {
106105
return (
107106
<div className={this.state.classes.join(" ")}>
108-
<label className="control-label" htmlFor="default">{labelName ? labelName : "Default Label"}</label>
107+
<label className="control-label">{labelName ? labelName : "Default Label"}</label>
109108
{this.props.type && this.props.type === "inputMask" ?
110109
<InputMask type={inputMaskType || "text"} placeholder={this.state.placeholder} {...props}
111110
onFocus={this.handleOnFocus} onBlur={this.handleOnFocusOut} ref={(input) => {
112111
this.inputs = input
113112
}} className={this.state.inputClasses.join(" ")}/> :
114-
<input id={"default"} {...props} onFocus={this.handleOnFocus} onBlur={this.handleOnFocusOut}
113+
<input {...props} onFocus={this.handleOnFocus} onBlur={this.handleOnFocusOut}
115114
ref={(input) => {
116115
this.inputs = input
117116
}} className={this.state.inputClasses.join(" ")} type={this.props.type || "text"}/>}

0 commit comments

Comments
 (0)