Skip to content
Snippets Groups Projects
Commit 9cb14a7c authored by Lucas Eduardo Schoenfelder's avatar Lucas Eduardo Schoenfelder
Browse files

responsiveness fix

parent aa3db47f
Branches
No related tags found
3 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!24Tela recurso
...@@ -72,6 +72,8 @@ export default function CommentForm (props) { ...@@ -72,6 +72,8 @@ export default function CommentForm (props) {
} }
} }
let windowWidth = window.innerWidth
return ( return (
<StyledForm onSubmit={handleSubmit}> <StyledForm onSubmit={handleSubmit}>
<label htmlFor="avaliacao-estrelas" className="start-label"> <label htmlFor="avaliacao-estrelas" className="start-label">
...@@ -91,6 +93,10 @@ export default function CommentForm (props) { ...@@ -91,6 +93,10 @@ export default function CommentForm (props) {
<div className="star-alert" style={attemptedSubmit ? {visibility : "visible"} : {visibility : "hidden" }}>{props.recurso ? "Avalie se o recurso foi útil." : "Avalie se esta coleção foi útil."}</div> <div className="star-alert" style={attemptedSubmit ? {visibility : "visible"} : {visibility : "hidden" }}>{props.recurso ? "Avalie se o recurso foi útil." : "Avalie se esta coleção foi útil."}</div>
<Grid container> <Grid container>
{
windowWidth > 990 ?
(
<>
<Grid item xs={10}> <Grid item xs={10}>
<StyledTextField <StyledTextField
colecao={!props.recurso} colecao={!props.recurso}
...@@ -120,6 +126,44 @@ export default function CommentForm (props) { ...@@ -120,6 +126,44 @@ export default function CommentForm (props) {
</Grid> </Grid>
<div className="campos-obrigatorios">* Campos obrigatórios.</div> <div className="campos-obrigatorios">* Campos obrigatórios.</div>
</>
)
:
(
<>
<Grid item xs={12}>
<StyledTextField
colecao={!props.recurso}
value={comment.value}
multiline
rows="5"
error={comment.error}
label={props.recurso ? "Escreva aqui a sua experiência com este Recurso" : "Escreva aqui a sua experiência com esta Coleção"}
onChange={e => handleChange(e)}
required={true}
help = {comment.error ? (props.recurso ? "Escreva aqui a sua experiência com este Recurso" : "Escreva aqui a sua experiência com esta Coleção") : ''}
/>
</Grid>
<Grid item xs={12}>
<div style={{paddingTop : "18px", display : "flex", justifyContent : "space-between"}}>
<div className="campos-obrigatorios">* Campos obrigatórios.</div>
<div style={{width : "40%"}}>
{
props.recurso ?
(
<OrangeButton type="submit">Publicar</OrangeButton>
)
:
(
<PurpleButton type="submit"><EditIcon/>Enviar</PurpleButton>
)
}
</div>
</div>
</Grid>
</>
)
}
</Grid > </Grid >
</StyledForm> </StyledForm>
) )
...@@ -177,6 +221,9 @@ const StyledForm = styled.form` ...@@ -177,6 +221,9 @@ const StyledForm = styled.form`
display : flex; display : flex;
flex-direction : column; flex-direction : column;
text-align : start; text-align : start;
@media screen and (max-width : 990px) {
padding-left : 15px;
}
.start-label { .start-label {
font-size : 14px; font-size : 14px;
......
...@@ -183,9 +183,12 @@ const GrayContainer = styled.div` ...@@ -183,9 +183,12 @@ const GrayContainer = styled.div`
display : flex; display : flex;
flex-direction : column; flex-direction : column;
justify-content : space-between; justify-content : space-between;
font-size : 14px;
padding-bottom : 20px;
@media screen and (min-width : 990px) {
padding-right : 15px; padding-right : 15px;
padding-left : 15px; padding-left : 15px;
padding-bottom : 20px; }
h3 { h3 {
font-family : 'Roboto Light','Roboto Regular',Roboto; font-family : 'Roboto Light','Roboto Regular',Roboto;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment