Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
butter-studio
Commits
1f3acca1
Commit
1f3acca1
authored
Jul 21, 2021
by
Kim, Subin
Browse files
Search component 수정
parent
a7e6bbcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
client/src/components/Search/Search.js
View file @
1f3acca1
import
styles
from
"
./search.module.scss
"
;
const
Search
=
({
type
,
search
,
setSearch
,
handleClick
})
=>
{
const
Search
=
({
search
,
setSearch
,
handleClick
})
=>
{
function
handleSearch
(
e
)
{
const
{
name
,
value
}
=
e
.
target
setSearch
({
...
search
,
[
name
]:
value
})
}
console
.
log
(
"
type==
"
,
type
)
return
(
<
div
className
=
"
d-flex
"
>
{
type
===
"
home
"
?
null
:
<
select
className
=
{
`form-select
${
styles
.
search
}
`
}
name
=
"
kind
"
aria
-
label
=
"
select search
"
onChange
=
{
handleSearch
}
>
<
option
value
=
"
title
"
>
제목
<
/option
>
<
option
value
=
"
director
"
>
감독명
<
/option
>
<
/select
>
}
<
input
className
=
{
`form-control
${
type
===
"
home
"
?
styles
.
searchWhite
:
`
${
styles
.
search
}
`
}
`
}
name
=
"
keyword
"
type
=
"
text
"
autoComplete
=
"
off
"
onChange
=
{
handleSearch
}
/
>
<
i
className
=
{
`bi bi-search align-self-center
${
type
===
"
home
"
?
"
text-white
"
:
"
mx-2
"
}
${
styles
.
icon
}
`
}
onClick
=
{
handleClick
}
style
=
{{
fontSize
:
"
1.3rem
"
}}
><
/i
>
<
input
className
=
{
`form-control
${
search
.
type
===
"
home
"
?
styles
.
searchWhite
:
`
${
styles
.
search
}
`
}
`
}
name
=
"
keyword
"
type
=
"
text
"
autoComplete
=
"
off
"
onChange
=
{
handleSearch
}
/
>
<
i
className
=
{
`bi bi-search align-self-center
${
search
.
type
===
"
home
"
?
"
text-white
"
:
"
mx-2
"
}
${
styles
.
icon
}
`
}
onClick
=
{
handleClick
}
style
=
{{
fontSize
:
"
1.3rem
"
}}
><
/i
>
<
/div
>
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment