Skip to content

Conversation

jsutterfield
Copy link
Contributor

@jsutterfield jsutterfield commented Feb 20, 2019

This PR updates the Dropdown component to take an optional iconName which is used to determine the chevron for the dropdown.

We're using this Dropdown for the category picker in Feeds. The designs call for a different chevron for desktop vs mobile. See:
https://app.zeplin.io/project/5b563d14e825ad811a6d3226/screen/5c6260e5ad81ec99d9f194b1
https://app.zeplin.io/project/5b563d14e825ad811a6d3226/screen/5c6260e9959ef19a21f6ae39

/cc @Wikia/iwing @vforge

Relates to https://github.com/Wikia/fepo/pull/439

@jsutterfield jsutterfield requested a review from vforge as a code owner February 20, 2019 16:28
@vforge
Copy link
Collaborator

vforge commented Feb 20, 2019

@jsutterfield Since the <Icon> is deprecated and will be removed in the near (as it requires the Sprite anyway) can we specify the component instead?

<Dropdown toggle="Toggle dropdown" icon=IconDropdownTiny >
    <p style={{padding: '12px'}}>I am a text inside dropdown!</p>
</Dropdown>

@vforge
Copy link
Collaborator

vforge commented Feb 20, 2019

Sorry for not catching that earlier - the icon should already be replaced in Wikia/react-design-system#89 ages ago

@jsutterfield
Copy link
Contributor Author

@vforge I ran into the following error when trying to pass the icon-specific component as a parameter:

screen shot 2019-02-21 at 2 09 44 pm
screen shot 2019-02-21 at 2 14 08 pm

I opted to take the same approach that BannerNotification does. Namely, using strings as the arguments and proptypes but using the value of the string to figure out which icon component to render.

Copy link
Collaborator

@vforge vforge left a comment

Choose a reason for hiding this comment

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

Sounds good!

@vforge vforge merged commit 5e5afe1 into master Feb 22, 2019
@vforge vforge deleted the add-iconName-to-dropdown branch February 22, 2019 23:13
@vforge
Copy link
Collaborator

vforge commented Feb 22, 2019

https://github.com/Wikia/react-common/releases/tag/3.3.0

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.

3 participants