-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f67b5d
commit e0c7837
Showing
4 changed files
with
21 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ module.exports = { | |
'import', | ||
], | ||
rules: { | ||
"react/prop-types": "off" | ||
}, | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
import React from "react"; | ||
import "../style/components/input.css" | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import '../style/components/input.css'; | ||
|
||
export default function Input(props) { | ||
return ( | ||
<div className="Input"> | ||
<label> | ||
{props.label} | ||
</label> | ||
<input placeholder={props.placeholder} className={props.className} onChange={props.onChange}/> | ||
</div> | ||
); | ||
function Input(props) { | ||
return ( | ||
<div className="Input"> | ||
<label> | ||
{props?.label} | ||
</label> | ||
<input placeholder={props?.placeholder} className={props?.className} onChange={props?.onChange} /> | ||
</div> | ||
); | ||
} | ||
|
||
Input.propTypes = { | ||
label: PropTypes.string, | ||
placeholder: PropTypes.string, | ||
className: PropTypes.string, | ||
onChange: PropTypes.func, | ||
}; | ||
|
||
export default Input; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters