Last active
February 13, 2025 16:50
-
-
Save Maransatto/6454f1c3437ab2d51dd3fd0bf3761995 to your computer and use it in GitHub Desktop.
React Event Listeners e useState
This file contains hidden or 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
.customers { | |
list-style: none; | |
max-width: 50rem; | |
margin: 1rem auto; | |
padding: 1rem 0; | |
display: grid; | |
grid-template-columns: repeat(3, 30%); | |
gap: 1rem; | |
justify-content: center; | |
} |
This file contains hidden or 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
import classes from "./NewCustomer.module.css"; | |
export default function NewCustomer() { | |
return ( | |
<form className={classes.form}> | |
<p> | |
<label htmlFor="name">Nome</label> | |
<input type="text" name="name" required /> | |
</p> | |
<p> | |
<label htmlFor="phone">Telefone</label> | |
<input type="text" name="phone" required /> | |
</p> | |
<p> | |
<label htmlFor="address">Endereço</label> | |
<textarea name="address" rows={3} required></textarea> | |
</p> | |
</form> | |
); | |
} |
This file contains hidden or 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
.form { | |
background-color: #fff; | |
padding: 1rem; | |
width: 20rem; | |
margin: 2rem auto; | |
border-radius: 6px; | |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | |
} | |
.form label { | |
font-family: "Montserrat", sans-serif; | |
font-size: 1rem; | |
color: #333; | |
display: block; | |
margin-bottom: 0.5rem; | |
} | |
.form input, | |
.form textarea { | |
width: 100%; | |
padding: 0.5rem; | |
margin-bottom: 1rem; | |
border: 1px solid #ccc; | |
border-radius: 4px; | |
font-size: 0.875rem; | |
font-family: "Roboto", sans-serif; | |
background-color: #f9f9f9; | |
} | |
.form input:focus, | |
.form textarea:focus { | |
border-color: #ff7e5f; | |
outline: none; | |
box-shadow: 0 0 5px rgba(255, 126, 95, 0.5); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment