Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
GCL_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
이승윤
2021-04-18 18:31:07 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
045479a1ddb81e851a8137624bcca7092fbd8892
045479a1
1 parent
66900dbf
feat: Common component 추가- SearchBox
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
frontend/src/components/common/Input.js
frontend/src/components/common/Input.js
0 → 100644
View file @
045479a
import
React
from
'react'
;
import
styled
from
'styled-components'
;
import
{
inputColorMap
}
from
'../../lib/styles/palette'
;
const
InputBlock
=
styled
.
div
`
input {
padding: 20px;
padding-right: 200px;
color:
${
props
=>
inputColorMap
[
props
.
color
].
color
}
;
box-shadow: 2px 3px 28px 1px rgba(0, 0, 0, 0.1);
border: 3px solid
${
props
=>
inputColorMap
[
props
.
color
].
borderColor
}
;
font-size:
${
props
=>
props
.
size
}
;
&::placeholder {
color:
${
props
=>
inputColorMap
[
props
.
color
].
placeholder
}
;
text-transform: uppercase;
}
}
float:
${
props
=>
props
.
float
||
''
}
;
`
;
const
Input
=
({
children
,
color
,
size
,
float
})
=>
{
return
(
<
InputBlock
color
=
{
color
}
size
=
{
size
}
float
=
{
float
}
>
<
input
placeholder
=
{
children
}
color
=
{
color
}
/
>
<
/InputBlock
>
);
};
export
default
Input
;
Please
register
or
login
to post a comment