1
0
Fork 0
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:
muerwre 2019-08-02 18:13:23 +07:00
parent 9220f09fe5
commit 6066c91060
5 changed files with 56 additions and 4 deletions

View 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 };