Skip to content

Conversation

@smlkA
Copy link

@smlkA smlkA commented Feb 24, 2019

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.

`

const tagColors = ['lipstick', 'vividPurple', 'rouge', 'warmPurple']
const morePlaqueColor = '#545454'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move it to src/utils/css-utils.js please, there is speations colors objects there

onTagClick: () => null,
}

TagListCutter.propTypes = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is prefered to use Flow instead of propTypes

selectedTags={selectedTags}
onTagClick={toggleTag}
/>
<TagListCutter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need in function body and return statement here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants