react-mui-auth-page
Version:
React Login/SignUp components Library backed by Material UI for fast Development
114 lines (83 loc) • 3.29 kB
Markdown
//img.shields.io/npm/v/react-mui-auth-page?style=flat-square)    
`npm i react-mui-auth-page`
[ ](https://react-mui-auth-page.surge.sh)
[ ](https://codesandbox.io/s/react-mui-auth-page-demo-i5yxe?file=/src/App.js)
```js
import { DialogAuth } from "react-mui-auth-page";
```
```js
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;
```
| 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](
| Prop Name | Type |
| --------- | -------- |
| Google | Function |
| Linkedin | Function |
| Github | Function |
| Facebook | Function |
| Twitter | Function |
```
npm install
```
```
npm run dev
```
**With Tabs**
<img src='./example/Dialog with Tabs.png' width='70%'>
**WithOut Tabs**
<img src='./example/Dialog without Tabs.png' width='70%'>
- Pull requests are welcome!
- Submit github issues for any feature enhancements, bugs or documentation problems
[ ](https://github.com/arpitbhalla)
![npm](https: