wrapper for tag list to show/hide tags #324#397
Open
smlkA wants to merge 1 commit intoWebPurple:masterfrom
Open
wrapper for tag list to show/hide tags #324#397smlkA wants to merge 1 commit intoWebPurple:masterfrom
smlkA wants to merge 1 commit intoWebPurple:masterfrom
Conversation
kitos
requested changes
Feb 25, 2019
| ` | ||
|
|
||
| const tagColors = ['lipstick', 'vividPurple', 'rouge', 'warmPurple'] | ||
| const morePlaqueColor = '#545454' |
Member
There was a problem hiding this comment.
move it to src/utils/css-utils.js please, there is speations colors objects there
| onTagClick: () => null, | ||
| } | ||
|
|
||
| TagListCutter.propTypes = { |
Member
There was a problem hiding this comment.
it is prefered to use Flow instead of propTypes
| selectedTags={selectedTags} | ||
| onTagClick={toggleTag} | ||
| /> | ||
| <TagListCutter |
Member
There was a problem hiding this comment.
To tell the truth this composition looks pretty complex.
It would be much simpler if the logic related to expanding/collapsing tags just live in Tags component.
| label, | ||
| theme, | ||
| onTagClick, | ||
| LabelComponent = label => <TagListLabel>{label}</TagListLabel>, |
Member
There was a problem hiding this comment.
if you are using render props, it is better to name them renderLabel, renderMoreTags to make it clearer for the user of the component what should he pass in.
| import React from 'react' | ||
|
|
||
| const DownArrowIcon = props => { | ||
| return ( |
Member
There was a problem hiding this comment.
no need in function body and return statement here
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
#324
also I have implemented different initial number of visible tags for different screen sizes (currently 2 options to set: mobile and desktop).
If animation of expanding/collapsing is required I may add it.