Use tabs, add jmap-client-ts, use it a bit
This commit is contained in:
parent
913856c11b
commit
05779c0b64
8 changed files with 88 additions and 37 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import Button from "react-bootstrap/Button"
|
||||
import Form from "react-bootstrap/Form"
|
||||
import Modal from "react-bootstrap/Modal"
|
||||
import Button from "react-bootstrap/Button";
|
||||
import Form from "react-bootstrap/Form";
|
||||
import Modal from "react-bootstrap/Modal";
|
||||
|
||||
import React, {useState} from "react"
|
||||
import React, { useState } from "react";
|
||||
|
||||
type AuthProps = {
|
||||
onLogin: (email: string, password: string) => void;
|
||||
}
|
||||
onLogin: (email: string, password: string) => void;
|
||||
};
|
||||
|
||||
const AuthModal: React.FC<AuthProps> = ({ onLogin }) => {
|
||||
const [email, setEmail] = useState("");
|
||||
|
|
@ -23,10 +23,19 @@ const AuthModal: React.FC<AuthProps> = ({ onLogin }) => {
|
|||
</Modal.Header>
|
||||
|
||||
<Modal.Body>
|
||||
<Form onSubmit={(e) => {e.preventDefault(); onLogin(email, password)}}>
|
||||
<Form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
onLogin(email, password);
|
||||
}}
|
||||
>
|
||||
<Form.Group className="mb-3" controlId="formBasicEmail">
|
||||
<Form.Label>Email address</Form.Label>
|
||||
<Form.Control type="email" placeholder="Enter email" onChange={e => setEmail(e.target.value)}/>
|
||||
<Form.Control
|
||||
type="email"
|
||||
placeholder="Enter email"
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
/>
|
||||
<Form.Text className="text-muted">
|
||||
We'll never share your email with anyone else.
|
||||
</Form.Text>
|
||||
|
|
@ -34,16 +43,21 @@ const AuthModal: React.FC<AuthProps> = ({ onLogin }) => {
|
|||
|
||||
<Form.Group className="mb-3" controlId="formBasicPassword">
|
||||
<Form.Label>Password</Form.Label>
|
||||
<Form.Control type="password" placeholder="Password" onChange={e => setPassword(e.target.value)}/>
|
||||
<Form.Control
|
||||
type="password"
|
||||
placeholder="Password"
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
/>
|
||||
</Form.Group>
|
||||
<Button variant="primary" type="submit">Login</Button>
|
||||
<Button variant="primary" type="submit">
|
||||
Login
|
||||
</Button>
|
||||
</Form>
|
||||
</Modal.Body>
|
||||
|
||||
<Modal.Footer>
|
||||
</Modal.Footer>
|
||||
<Modal.Footer></Modal.Footer>
|
||||
</Modal.Dialog>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
export default AuthModal;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue