-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(example): import styles as ESModules in simple-auth (#29823)
- Loading branch information
Showing
6 changed files
with
34 additions
and
32 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
import React from "react" | ||
import styles from "./form.module.css" | ||
import { form, form__label, form__input, form__button } from "./form.module.css" | ||
import { navigate } from "@reach/router" | ||
|
||
export default ({ handleSubmit, handleUpdate }) => ( | ||
<form | ||
className={styles.form} | ||
className={form} | ||
method="post" | ||
onSubmit={event => { | ||
handleSubmit(event) | ||
navigate(`/app/profile`) | ||
}} | ||
> | ||
<p className={styles[`form__instructions`]}> | ||
<p> | ||
For this demo, please log in with the username <code>gatsby</code> and the | ||
password <code>demo</code>. | ||
</p> | ||
<label className={styles[`form__label`]}> | ||
<label className={form__label}> | ||
Username | ||
<input | ||
className={styles[`form__input`]} | ||
className={form__input} | ||
type="text" | ||
name="username" | ||
onChange={handleUpdate} | ||
/> | ||
</label> | ||
<label className={styles[`form__label`]}> | ||
<label className={form__label}> | ||
Password | ||
<input | ||
className={styles[`form__input`]} | ||
className={form__input} | ||
type="password" | ||
name="password" | ||
onChange={handleUpdate} | ||
/> | ||
</label> | ||
<input className={styles[`form__button`]} type="submit" value="Log In" /> | ||
<input className={form__button} type="submit" value="Log In" /> | ||
</form> | ||
) |
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
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
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
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
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