Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-05-08 12:07:19 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ca7c8e9fa8072532bc4fbf41722639432017b6ac
ca7c8e9f
1 parent
4748f0bc
Create Input.js
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
front/src/Components/Input.js
front/src/Components/Input.js
0 → 100644
View file @
ca7c8e9
import
React
from
"react"
;
import
styled
from
"styled-components"
;
import
PropTypes
from
"prop-types"
;
const
Container
=
styled
.
input
`
border: 0;
border-radius: 10px;
font-size: 15px;
padding: 10px 10px;
opacity: 0.8;
text-align: center;
`
;
const
Input
=
({
placeholder
,
required
=
true
,
value
,
onChange
,
type
=
"text"
,
})
=>
(
<
Container
placeholder
=
{
placeholder
}
required
=
{
required
}
value
=
{
value
}
onChange
=
{
onChange
}
type
=
{
type
}
/
>
);
Input
.
propTypes
=
{
placeholder
:
PropTypes
.
string
.
isRequired
,
required
:
PropTypes
.
bool
,
value
:
PropTypes
.
string
.
isRequired
,
onChange
:
PropTypes
.
func
.
isRequired
,
type
:
PropTypes
.
string
,
};
export
default
Input
;
Please
register
or
login
to post a comment