0.2.3 • Published 6 years ago

gate6reactlogin v0.2.3

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

react-login

NPM version

Simple login component.

Installation

Install with npm install gate6reactlogin

Example usage

  1. Import Login component from gate6reactlogin
  2. Define "config" variables.
  3. Create submit handle function.
  4. Pass "config" variables in "props" of Login component.
import React from "react";
import Login from 'gate6reactlogin';
class App extends React.Component {
    constructor(props) {
        super(props);
        this.handleSubmit = this.handleSubmit.bind(this);
    }
    handleSubmit(user, status){
        console.log(user, status);
    }
	componentWillMount() {
		this.props.onCreate();
	}
 	render() {
        const config = {
            handleSubmit:this.handleSubmit,
            parentClass:'loginWrapper',
            passwordPattern:'^(?=.*[A-Z])(?=.*\d)[A-Za-z\d$@$!%*#?&]{7,}\S$',
            usernameLabel:'Email',
            passwordLabel:'Password',
            inputClass:'form-input',
            errorClass:'error-text',
        }
    	return <div>
			    <Login config={config} />
    	</div>
  	}
}
export default App;

License (MIT)

Copyright (c) 2017 Sadique <sadique.poolwala@gate6.com>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago