generated from goitacademy/react-homework-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
edited feedback and app components added css
- Loading branch information
1 parent
3842e41
commit 8bd6f44
Showing
7 changed files
with
92 additions
and
18 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,5 +1,22 @@ | ||
// import PropTypes from 'prop-types'; | ||
import propTypes from 'prop-types'; | ||
import css from './FeedbackOptions.module.css'; | ||
import { nanoid } from 'nanoid'; | ||
|
||
export const FeedbackOptions = (options, onLeaveFeedback) => { | ||
return {}; | ||
export const FeedbackOptions = ({ options, onLeaveFeedback }) => ( | ||
<div> | ||
{options.map(option => ( | ||
<button | ||
key={nanoid()} | ||
onClick={() => onLeaveFeedback(option)} | ||
className={css.feedbackBtn} | ||
> | ||
{option} | ||
</button> | ||
))} | ||
</div> | ||
); | ||
|
||
FeedbackOptions.propTypes = { | ||
options: propTypes.arrayOf(propTypes.string).isRequired, | ||
onLeaveFeedback: propTypes.func.isRequired, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.feedbackBtn { | ||
.search-btn { | ||
color: #fff; | ||
padding: 5px 5px; | ||
font-size: 15px; | ||
border-radius: 5px; | ||
border: none; | ||
cursor: pointer; | ||
background: #6e6d70; | ||
letter-spacing: 0.04em; | ||
transition: 250ms cubic-bezier(0.4, 0, 0.2, 1); | ||
} | ||
} |
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,7 +1,7 @@ | ||
import PropTypes from 'prop-types'; | ||
import propTypes from 'prop-types'; | ||
|
||
export const Notification = ({ message }) => <p>{message}</p>; | ||
|
||
Notification.propTypes = { | ||
message: PropTypes.string.isRequired, | ||
message: propTypes.string.isRequired, | ||
}; |
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