react-asap-forms

Reuseable Login, Signup Forms

Usage no npm install needed!

<script type="module">
  import reactAsapForms from 'https://cdn.skypack.dev/react-asap-forms';
</script>

README

react-asap-forms

Reuseable Login, Signup Forms

NPM JavaScript Style Guide

Install

npm install --save react-asap-forms

Usage

>You have to import this file at the top of app.js

import "react-asap-forms/dist/index.css";
```jsx
import React, { Component } from 'react'

import { LoginForm, SignupForm } from 'react-asap-forms'
import 'react-asap-forms/dist/index.css'

class LoginExample extends Component {
   var data = {
    heading: "",    //optional bydefault it value 'Login'
    loginFormSubmit: formSubmit,
    validationSchema, //validation schema object to validate form
    initialValues  // initial values to populate form fields
  }

  render() {
    return <LoginForm {...data} />
  }
}



class SignUpExample extends Component {
   var data = {
    heading: "",    //optional bydefault it value 'Register'
    signupFormSubmit: formSubmit,
    validationSchema, //validation schema object to validate form
    initialValues  // initial values to populate form fields
  }

  render() {
    return <SignupForm {...data} />
  }
}

License

MIT © SaqibJamil7866