forked from M3-Academy/desafio-react-e-typescript
fix: Consertado a estilização do checkbox
This commit is contained in:
parent
d4c22e384c
commit
f43412ec23
@ -95,8 +95,15 @@ const FormInput = () => {
|
||||
{({ errors, touched }) => (
|
||||
<Form>
|
||||
<div className={styles["form-col"]}>
|
||||
<label htmlFor="nome">Nome</label>
|
||||
<ErrorMessage component="span" name="nome" />
|
||||
<div className={styles["form-text"]}>
|
||||
<label htmlFor="nome">Nome</label>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
name="nome"
|
||||
className={styles["form-error"]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Field
|
||||
type="text"
|
||||
id="nome"
|
||||
@ -105,20 +112,33 @@ const FormInput = () => {
|
||||
className={errors.nome && touched.nome && "invalid"}
|
||||
/>
|
||||
</div>
|
||||
<div className={styles["form-col"]}>
|
||||
<ErrorMessage component="span" name="termos" />
|
||||
<label htmlFor="check">
|
||||
<a href="/">Declaro que li e aceito</a>
|
||||
</label>
|
||||
<div className={styles["form-col"] && styles["form-check"]}>
|
||||
<div className={styles["form-text-check"]}>
|
||||
<ErrorMessage
|
||||
component="span"
|
||||
name="termos"
|
||||
className={styles["form-error"]}
|
||||
/>
|
||||
<label htmlFor="check">
|
||||
<a href="/">Declaro que li e aceito</a>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<Field
|
||||
type="checkbox"
|
||||
id="check"
|
||||
name="termos"
|
||||
className={errors.termos && touched.termos && "invalid"}
|
||||
className={
|
||||
errors.termos &&
|
||||
touched.termos &&
|
||||
"invalid" &&
|
||||
styles["form-checkbox"]
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<button type="submit">Cadastre-se</button>
|
||||
<button className={styles["form-btn"]} type="submit">
|
||||
Cadastre-se
|
||||
</button>
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
|
@ -41,6 +41,7 @@
|
||||
.form-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.form-col label {
|
||||
font-weight: 400;
|
||||
@ -69,6 +70,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-wrapper button {
|
||||
width: 100%;
|
||||
height: 52.44px;
|
||||
@ -80,4 +82,38 @@
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
font-weight: 400;
|
||||
@media screen and (min-width: 2500px) {
|
||||
height: 71px;
|
||||
font-size: 32px;
|
||||
}
|
||||
}
|
||||
.form-text {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.form-error {
|
||||
color: red;
|
||||
}
|
||||
.form-check {
|
||||
display: flex;
|
||||
flex-direction: rows;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.form-check label {
|
||||
a {
|
||||
color: #000;
|
||||
}
|
||||
margin-right: 5px;
|
||||
}
|
||||
.form-checkbox {
|
||||
}
|
||||
|
||||
#check {
|
||||
font-size: 15px;
|
||||
border: 1px solid #000000;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.form-btn {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user