Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PortalMEC-React
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PortalMEC
PortalMEC-React
Commits
ce23973a
Commit
ce23973a
authored
Jan 31, 2020
by
mrp19
Browse files
Options
Downloads
Patches
Plain Diff
fixed css do formulário
parent
d0cdae16
No related branches found
No related tags found
3 merge requests
!57
Merge of develop into master
,
!56
Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...
,
!12
Resolve "Criar tela de contato"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Components/FormInput.js
+4
-0
4 additions, 0 deletions
src/Components/FormInput.js
src/Pages/Contact.js
+65
-29
65 additions, 29 deletions
src/Pages/Contact.js
with
69 additions
and
29 deletions
src/Components/FormInput.js
+
4
−
0
View file @
ce23973a
...
@@ -67,8 +67,12 @@ export default function FormInput(props) {
...
@@ -67,8 +67,12 @@ export default function FormInput(props) {
type
=
{
props
.
inputType
}
type
=
{
props
.
inputType
}
value
=
{
props
.
value
}
value
=
{
props
.
value
}
onChange
=
{
props
.
handleChange
}
onChange
=
{
props
.
handleChange
}
helperText
=
{
props
.
help
}
rows
=
{
props
.
rows
}
rowsMax
=
{
props
.
rowsMax
}
InputProps
=
{{
className
:
classes
.
input
}}
InputProps
=
{{
className
:
classes
.
input
}}
style
=
{{
width
:
"
100%
"
}}
style
=
{{
width
:
"
100%
"
}}
multiline
=
{
props
.
multi
}
/
>
/
>
<
/FormContainerStyled
>
<
/FormContainerStyled
>
...
...
This diff is collapsed.
Click to expand it.
src/Pages/Contact.js
+
65
−
29
View file @
ce23973a
...
@@ -19,6 +19,8 @@ along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>
...
@@ -19,6 +19,8 @@ along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>
import
React
,
{
Component
,
useState
,
useEffect
}
from
'
react
'
;
import
React
,
{
Component
,
useState
,
useEffect
}
from
'
react
'
;
import
styled
from
'
styled-components
'
;
import
styled
from
'
styled-components
'
;
import
Banner1
from
'
../img/banner-sobre.jpg
'
;
import
Banner1
from
'
../img/banner-sobre.jpg
'
;
import
{
TextField
}
from
'
@material-ui/core
'
;
import
FormInput
from
"
../Components/FormInput.js
"
const
Seção1
=
styled
.
div
`
const
Seção1
=
styled
.
div
`
width: 100%;
width: 100%;
...
@@ -147,6 +149,42 @@ const Seção3 = styled.div `
...
@@ -147,6 +149,42 @@ const Seção3 = styled.div `
class
Contact
extends
Component
{
class
Contact
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
nome
:
""
,
email
:
""
,
mensagem
:
""
};
this
.
handleChange
=
this
.
handleChange
.
bind
(
this
);
this
.
onSubmit
=
this
.
onSubmit
.
bind
(
this
);
};
handleChange
=
e
=>
{
this
.
setState
({[
e
.
target
.
name
]:
e
.
target
.
value
})
};
onSubmit
=
(
e
)
=>
{
//on submit we should prevent the page from refreshing
e
.
preventDefault
();
//though this is arguable
//pass user info to Store.js and clear all text fields
console
.
log
(
this
.
state
);
this
.
setState
({
nome
:
""
,
email
:
""
,
mensagem
:
""
})
}
render
()
{
render
()
{
return
(
return
(
<>
<>
...
@@ -160,35 +198,33 @@ class Contact extends Component {
...
@@ -160,35 +198,33 @@ class Contact extends Component {
<
Formulário
>
<
Formulário
>
<
h2
>
Entre
em
contato
para
enviar
dúvidas
,
<
br
/>
sugestões
ou
críticas
<
/h2
>
<
h2
>
Entre
em
contato
para
enviar
dúvidas
,
<
br
/>
sugestões
ou
críticas
<
/h2
>
<
form
>
<
form
onSubmit
=
{
this
.
onSubmit
}
>
<
div
className
=
"
inputBlock
"
>
<
FormInput
<
label
htmlFor
=
"
nome
"
>
Nome
*<
/label
>
inputType
=
{
"
text
"
}
<
input
name
=
{
"
nome
"
}
required
value
=
{
this
.
state
.
nome
}
name
=
"
nome
"
placeholder
=
{
"
Nome *
"
}
id
=
"
nome
"
handleChange
=
{
e
=>
this
.
handleChange
(
e
)}
/
>
/
>
<
/div
>
<
FormInput
<
div
className
=
"
inputBlock
"
>
inputType
=
{
"
text
"
}
<
label
htmlFor
=
"
email
"
>
E
-
mail
*<
/label
>
name
=
{
"
email
"
}
<
input
value
=
{
this
.
state
.
email
}
required
placeholder
=
{
"
E-mail *
"
}
name
=
"
email
"
handleChange
=
{
e
=>
this
.
handleChange
(
e
)}
id
=
"
email
"
/
>
/
>
<
/div
>
<
FormInput
<
div
className
=
"
inputBlock Message
"
>
inputType
=
{
"
text
"
}
<
label
htmlFor
=
"
mensagem
"
>
Mensagem
*<
/label
>
name
=
{
"
mensagem
"
}
<
input
value
=
{
this
.
state
.
mensagem
}
required
placeholder
=
{
"
Mensagem *
"
}
nome
=
"
mensagem
"
multi
=
{
true
}
id
=
"
mensagem
"
rows
=
"
3
"
rowsMax
=
"
5
"
help
=
"
Escreva sua mensagem no campo acima.
"
handleChange
=
{
e
=>
this
.
handleChange
(
e
)}
/
>
/
>
<
/div
>
<
button
onClick
=
{
e
=>
this
.
onSubmit
(
e
)}
>
Enviar
Mensagem
<
/button
>
<
button
type
=
"
submit
"
>
Enviar
Mensagem
<
/button
>
<
/form
>
<
/form
>
<
/Formulário
>
<
/Formulário
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment