-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for custom styles #44
Add Support for custom styles #44
Conversation
/>, | ||
); | ||
|
||
expect(wrapper.find('input')).to.exist; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use some help making this assertion more helpful.. Was having trouble checking for style props.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not invest time here and get rid of enzyme altogether since it's no longer maintained. We can use react-testing-library as a replacement.
9ff233a
to
3e98ae2
Compare
@PatrickDesign is this ready to be reviewed? Please request a review so that it's clear that this can be reviewed. |
Ready for review :) Let me know if you think of an easier way to support custom styles - maybe ditch using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you think of an easier way to support custom styles - maybe ditch using the style prop and apply our base styles via a class.
For libraries, I like using style objects instead of classNames because you don't have to setup CSS or CSS in JS in your app to use the styling if you are using the object form. Also it's better for dynamic styling.
This is great work. Thank you for doing this. I have left a single comment that might need action.
README.md
Outdated
resultsStyle|{}|Styles passed to each `result` in the dropdown list. | ||
resultsWrapperStyle|{}|Styles passed directly to the dropdown wrapper. | ||
selectedResultStyle|{}|Styles passed directly to current 'active' item. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use more generic term like list
instead of result
? Sometimes they might be suggestions instead of results so U think it makes sense to have more generic names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 🙇
resultsStyle
->listItemStyle
selectedResultStyle
->selectedListItemStyle
resultsWrapperStyle
->listWrapperStyle
dd67738
to
a416749
Compare
Group styles together in README.
a416749
to
e1a6943
Compare
Add 5 new props:
input
element.input
wrapperdiv
.Closes #42