1.0.9-beta-1 • Published 5 years ago

thblogin v1.0.9-beta-1

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

THB-Login

The Login module for React. Initially built for use in internal projectTHB.

Latest Version 1.0.9-beta-1 🎉

React THB-Login 1.0.9-beta-1 is a complete rewrite, written in order to overCome Certain Common features in the internal projects.

Improvements include:

  • Flexible approach to data, with customisable functions
  • Extensible styling API with emotion
  • Component Injection API for complete control over the UI behaviour
  • Controllable state props and modular architecture

If you're interested in using this please contact the admin for approval, Approace THB Team

Installation and usage

The easiest way to use thbLogin is to install it from npm and build it into your app with Webpack.

npm install thblogin --save
yarn add thblogin
``

dependencies of modules reqd. . Please install this modules also

"@material-ui/core": "^3.6.2",
"aws-amplify": "1.1.7",
"aws-amplify-react": "2.1.1"

Then use it in your app:

```js
import React, { Component } from 'react';
import './App.css';
import LoginContainer from 'thblogin';

class App extends Component {


  onCompleteLoggedIn=(data)=>{
    if(data.status === 'success'){
      let token = data.token; // you will get your token here on Successful login
      // now write your code here to redirect to another route eg. Dashboard
    }else{
      let error = data.message; // error message
    }
  }

  render() {
    return (
      <div className="App">
        <LoginContainer 
          loginTitle={"THB Login DEMO"}  
          loginLogo={"https://www.thb.co.in/static/media/offering-2.888cc5cc.png"}
          onLoggedInComplete={this.onCompleteLoggedIn}/>
      </div>
    );
  }
}

export default App;

If you don't provide these props, you can set the initial value of the state they control:

  • loginTitle - set the initial Text of the Login Screen , DEFAult text is "Login"
  • loginLogo - set the initial Logo icon of the Login Screen, Default is Thb icon
  • onLoggedInComplete - to get the status of the error or success in the login Process.

License

Thb Licensed. Copyright (c) 2018. Use this under permmision of THB. To use it in your private project please ask for licence

1.0.9-beta-1

5 years ago

1.0.9-beta

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago