1.1.6 • Published 3 years ago

simple-login-form v1.1.6

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

simple-login-form

Simple yet stunning React login form component with basic configurgable styling.

NPM JavaScript Style Guide

Install

npm install --save simple-login-form

simple-login-form

Usage

First you need to import the component and the stylesheet.

import React, { Component } from 'react'

import SimpleLoginForm from 'simple-login-form'
import 'simple-login-form/dist/index.css'

Then declare the <SimpleLoginForm /> tag where you see fit.

export default class App extends Component {
  // Copy and paste this into your project. Height is advised to be left as is. everything else can be manipulated to your likings.
  formStyle = {
    maxWidth: '350px',
    maxHeight: '525px',
    background: 'linear-gradient(#e66465, #9198e5)',
    borderRadius: '2%'
  }

  // function used to control submit event on form.
  sendUserInfoToDatabase = (userInfo, event) => {}

  render() {
    // The prop names must be identical to whats shown below or the component would not render.
    return (
      <React.Fragment>
        <SimpleLoginForm
          getUserInfo={this.sendUserInfoToDatabase}
          style={this.formStyle}
          photoIcon={picture}
        />
      </React.Fragment>
    )
  }
}

The forget password anchor links endpoint is 'forgot-password'. Use that endpoint to load whatever component or page you need to control what happens when a user clicks 'forgot password?'

License

MIT © kgeorge24

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.1

3 years ago

1.1.3

3 years ago

1.1.0

3 years ago

1.0.0

4 years ago