0.0.2 • Published 9 years ago

react-password-field v0.0.2

Weekly downloads
2
License
MIT
Repository
bitbucket
Last release
9 years ago

react-password-field

React component that represents a password field. There are also optional password rules that can be configured.

Installation

npm install react-password-field --save

Usage

var PasswordField = require('react-password-field');

functionToSetPasswordValue: function(value) {
    console.log("This is what I want to do with the value " + value);
},

functionToDealWithValidationMessage: function(value) {
console.log("Validation message(s) that confirm if the password rules are followed " + value);
},

render : function () {

    return (
        <div>
            <PasswordField name="My Field" setValue={this.functionToSetPasswordValue} setValidation={this.functionToDealWithValidationMessage} />
        </div>
    )

}

Testing

If you want to test the component in an alreay working context, there is an app already set up for that.To get the app running, do the following :

npm install // this installs the required packages for the component
npm install -g gulp // to build the test app
gulp // launches the default task 
npm install -g http-server // optional, if you want to use this server to view the app in a browser
http-server ./dist/ -p 4000 // to launch the server

Point your browser to http://127.0.0.1:4000 to see the sample app that uses the component.

0.0.2

9 years ago

0.0.1

9 years ago