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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PortalMEC
PortalMEC-React
Commits
d2c2af1c
Commit
d2c2af1c
authored
4 years ago
by
lfr20
Browse files
Options
Downloads
Patches
Plain Diff
Added icons to seacrh and clean input
parent
b7b54560
No related branches found
Branches containing commit
No related tags found
Tags containing commit
6 merge requests
!57
Merge of develop into master
,
!56
Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...
,
!39
Update admin system
,
!32
Homologa
,
!31
Fix console error
,
!28
Training materials
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Components/IframeOverlay/SearchInput.js
+38
-11
38 additions, 11 deletions
src/Components/IframeOverlay/SearchInput.js
with
38 additions
and
11 deletions
src/Components/IframeOverlay/SearchInput.js
+
38
−
11
View file @
d2c2af1c
...
@@ -5,6 +5,8 @@ import IconButton from '@material-ui/core/IconButton';
...
@@ -5,6 +5,8 @@ import IconButton from '@material-ui/core/IconButton';
import
OutlinedInput
from
'
@material-ui/core/OutlinedInput
'
;
import
OutlinedInput
from
'
@material-ui/core/OutlinedInput
'
;
import
InputAdornment
from
'
@material-ui/core/InputAdornment
'
;
import
InputAdornment
from
'
@material-ui/core/InputAdornment
'
;
import
FormControl
from
'
@material-ui/core/FormControl
'
;
import
FormControl
from
'
@material-ui/core/FormControl
'
;
import
Divider
from
'
@material-ui/core/Divider
'
;
import
CloseRoundedIcon
from
'
@material-ui/icons/CloseRounded
'
;
export
default
function
SearchInput
(
props
)
{
export
default
function
SearchInput
(
props
)
{
const
[
text
,
setText
]
=
useState
(
props
.
stdin
);
const
[
text
,
setText
]
=
useState
(
props
.
stdin
);
...
@@ -17,31 +19,56 @@ export default function SearchInput(props) {
...
@@ -17,31 +19,56 @@ export default function SearchInput(props) {
props
.
search
(
text
);
props
.
search
(
text
);
}
}
const
handleCleanInput
=
()
=>
{
setText
(
""
);
}
const
handleKeyUp
=
(
event
)
=>
{
if
(
event
.
key
===
"
Enter
"
)
handleClickSearch
()
}
return
(
return
(
<
Wrapper
>
<
Wrapper
>
<
FormControl
variant
=
"
outlined
"
style
=
{{
width
:
'
100%
'
}}
>
<
FormControl
variant
=
"
outlined
"
style
=
{{
width
:
'
100%
'
}}
>
<
OutlinedInput
<
OutlinedInput
type
=
"
text
"
type
=
"
text
"
value
=
{
text
}
value
=
{
text
}
placeholder
=
"
O quê você está buscando?
"
onChange
=
{
handleChange
}
onChange
=
{
handleChange
}
onKeyUp
=
{
handleKeyUp
}
endAdornment
=
{
endAdornment
=
{
<
InputAdornment
position
=
"
end
"
>
<>
<
IconButton
<
InputAdornment
position
=
"
end
"
>
onClick
=
{
handleClickSearch
}
<
IconButton
edge
=
"
end
"
onClick
=
{
handleCleanInput
}
>
edge
=
"
end
"
<
SearchIcon
/>
>
<
/IconButton
>
<
CloseRoundedIcon
/>
<
/InputAdornment
>
<
/IconButton
>
<
/InputAdornment
>
<
SizedWidhtBox
/>
<
Divider
orientation
=
"
vertical
"
flexItem
/>
<
InputAdornment
position
=
"
end
"
>
<
IconButton
onClick
=
{
handleClickSearch
}
edge
=
"
end
"
>
<
SearchIcon
style
=
{{
fill
:
"
#00bcd4
"
}}
/
>
<
/IconButton
>
<
/InputAdornment
>
<
/
>
}
}
/
>
/
>
<
/FormControl
>
<
/FormControl
>
<
/Wrapper
>
<
/Wrapper
>
);
);
}
}
const
Wrapper
=
styled
.
div
`
const
Wrapper
=
styled
.
div
`
background-color: white;
background-color: white;
border-radius: 5px;
border-radius: 5px;
margin: 20px;
margin: 20px;
`
const
SizedWidhtBox
=
styled
.
div
`
margin-right : 22px;
`
`
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