Created
August 26, 2019 15:31
-
-
Save RubaXa/e2925778db2e1e1a6185bd56c02074bb to your computer and use it in GitHub Desktop.
Poor slots. Describe.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type LoginFormProps = { | |
header?: boolean; // ⬅ опа 1️⃣ | |
title?: React.ReactNode; | |
email?: string; | |
password?: string; | |
} | |
function LoginForm(props: LoginFormProps) { | |
return ( | |
<Form> | |
{/* 2️⃣ готово */ } | |
{props.header !== false && <div className="header"> | |
<h2>{props.title || <>Вход</>}</h2> | |
</div>} | |
<div className="fields"> | |
<Input name="email" value={props.email} /> | |
<Input name="password" value={props.password} /> | |
</div> | |
<div className="controls"> | |
<Button kind="primary"/> | |
</div> | |
</Form> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment