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:
parent
1ab77decfd
commit
a93a64bf96
|
@ -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>;
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user