1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-12-25 00:11:36 +01:00

docs: Refactor EmailInput description

This commit is contained in:
Aleksandr Gumroian 2024-09-27 14:44:02 +02:00
parent 1ab77decfd
commit a93a64bf96
No known key found for this signature in database
GPG Key ID: 9E77849C64F0A733

View File

@ -6,6 +6,7 @@ All additional `props` are passed to the `<input type="email">` HTML component.
```js ```js
import { useState } from "react"; import { useState } from "react";
import Button from "./Button";
const [email, setEmail] = useState("Wrong email"); const [email, setEmail] = useState("Wrong email");
<form onSubmit={(e) => e.preventDefault()}> <form onSubmit={(e) => e.preventDefault()}>
<EmailInput <EmailInput
@ -14,6 +15,6 @@ const [email, setEmail] = useState("Wrong email");
helpText="Read the small text!" helpText="Read the small text!"
onChange={(event) => setEmail(event.target.value)} onChange={(event) => setEmail(event.target.value)}
/> />
<button type="submit">Try to submit</button> <Button type="submit">Try to submit</Button>
</form>; </form>;
``` ```