Skip to content
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

Fix/styles not used or typesafe #105

Closed

Conversation

RubenSmn
Copy link
Contributor

Problem

I wanted to style the component to align with my theme. But I was not able to do this due to:

  • classes are being overridden by the inline style
  • using the style prop on the ColorPicker component did not pass styles down to context and thus the other components

Solution

I fixed one problem which is the ability to use the style prop on the ColorPicker component. The styles passed down to this prop are getting merged with the default styles. For this I also updated the Styles typing which now gives you autocomplete to which options / components are available for styling.

With this is renamed some variables to better align with the value of these variables.

Let me know what you think, open for any feedback.

@hxf31891
Copy link
Owner

@RubenSmn Thanks for putting together this PR!

I added most of the functionality to v3.0.14. As of now, the passed styles object should correctly merge into the default styles taking precedence and the types should be updated. The only difference is that I did not change the style keys as I was concerned others may be using the existing names or that a style may be incorrectly applied during the changes.

Please let me know if you have any issues!

@hxf31891 hxf31891 closed this Dec 31, 2024
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