Giter Site home page Giter Site logo

arpitbhalla / react-mui-auth-page Goto Github PK

View Code? Open in Web Editor NEW
23.0 0.0 3.0 682 KB

React Login/SignUp components Library backed by Material UI for fast Development

Home Page: https://www.npmjs.com/package/react-mui-auth-page

License: MIT License

TypeScript 83.95% HTML 1.32% JavaScript 14.74%
material-ui react react-component-library

react-mui-auth-page's Introduction

react-mui-auth-page

npm npm NPM Snyk Vulnerabilities for npm package Libraries.io dependency status for latest release

Getting Started ๐Ÿš€

npm i react-mui-auth-page

Demo

Web Demo

CodeSandbox

Usage

import { DialogAuth } from "react-mui-auth-page";

Example

import React from "react";
import { DialogAuth } from "react-mui-auth-page";

const MyDialogAuthComponent = () => {
  const handleSignIn = ({ email, password }) => {
    console.log({ email, password });
  };
  const handleSignUp = async ({ email, name, password }) => {
    await doSomethingAsyn();
  };
  const handleForget = ({ email }) => {
    console.log({ email });
  };

  const handleSocial = {
    Google: () => {},
    Github: () => {},
  };

  return (
    <DialogAuth
      open={true}
      textFieldVariant="outlined"
      onClose={handleClose}
      handleSignUp={handleSignUp}
      handleForget={handleForget}
      handleSignIn={handleSignIn}
      handleSocial={handleSocial}
    />
  );
};

export default MyDialogAuthComponent;

Props

Prop Name Type Required Default Value
hideTabs Boolean Yes False
textFieldVariant "outlined" or "filled" or "standard" No filled
open Boolean Yes
onClose Function Yes
logoName string
logoComponent React Children
handleSignUp Function Yes
handleForget Function Yes
handleSignIn Function Yes
emailValidator Function
passwordValidator Function
handleSocial Social Object

Social Object

Prop Name Type
Google Function
Linkedin Function
Github Function
Facebook Function
Twitter Function

Local Run

npm install
npm run dev

ScreenShots

With Tabs

WithOut Tabs

Get Involved!

  • Pull requests are welcome!
  • Submit github issues for any feature enhancements, bugs or documentation problems

Maintainer

arpitBhalla

react-mui-auth-page's People

Contributors

arpitbhalla avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-mui-auth-page's Issues

handleSignup not working

The signature of handleSignin and handleSignup are exactly the same but handleSignup doesn't even execute when I register (signup) by entering the input in signup fields.

The handleSignin works just fine (prints the console log in the handleSignin. But there's something wrong with the handleSignup because it doesn't even console log the entered input fields (name, email, password).

  const handleSignIn = async ({ email, password }) => {
    try {
      await login(email, password);
    } catch (error) {
      alert('Login Error');
    }
    console.log({ email, password });
  };

  const handleSignUp = ({ name, email, password }) => {
    console.log('It doesn't even print this log');
}
fixthisshit.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.