mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
logindialog initial
This commit is contained in:
parent
9220f09fe5
commit
6066c91060
5 changed files with 56 additions and 4 deletions
42
src/containers/dialogs/LoginDialog/index.tsx
Normal file
42
src/containers/dialogs/LoginDialog/index.tsx
Normal file
|
@ -0,0 +1,42 @@
|
|||
import React, { FC, useState } from "react";
|
||||
import { ScrollDialog } from "../ScrollDialog";
|
||||
import { IDialogProps } from "~/redux/modal/constants";
|
||||
import { useCloseOnEscape } from "~/utils/hooks";
|
||||
import { Group } from "~/components/containers/Group";
|
||||
import { InputText } from "~/components/input/InputText";
|
||||
import { Button } from "../../../components/input/Button/index";
|
||||
import { Padder } from "~/components/containers/Padder";
|
||||
import * as styles from "./styles.scss";
|
||||
type IProps = IDialogProps & {};
|
||||
|
||||
const LoginDialog: FC<IProps> = ({ onRequestClose }) => {
|
||||
const [username, setUserName] = useState("");
|
||||
const [password, setPassword] = useState("");
|
||||
|
||||
const title = <div>title</div>;
|
||||
|
||||
const buttons = (
|
||||
<Padder>
|
||||
<Group horizontal>
|
||||
<Button title="ВОЙТИ" stretchy />
|
||||
</Group>
|
||||
</Padder>
|
||||
);
|
||||
|
||||
useCloseOnEscape(onRequestClose);
|
||||
|
||||
return (
|
||||
<ScrollDialog buttons={buttons} width={300}>
|
||||
<Padder>
|
||||
<div className={styles.wrap}>
|
||||
<Group>
|
||||
<InputText title="Логин" handler={setUserName} value={username} />
|
||||
<InputText title="Пароль" handler={setPassword} value={password} />
|
||||
</Group>
|
||||
</div>
|
||||
</Padder>
|
||||
</ScrollDialog>
|
||||
);
|
||||
};
|
||||
|
||||
export { LoginDialog };
|
Loading…
Add table
Add a link
Reference in a new issue