-
Notifications
You must be signed in to change notification settings - Fork 44
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
Stylability #30
Comments
Hi @karlvr, thank your help. The solution will be to expose some primitive with the basic behavior and let the user style components inside a renderProp:
I wrote this example quickly without testing anything. There is some work to do to make it functional, but if you understand the idea, it is nice! I would be very glad if you help me upgrade this library to let user styling each component on his own. |
Thanks for your quick reply! I quite liked the idea of using css classes, but that may be because we are using external CSS (less actually) files for our styling. What you've suggested above looks like it lets the developer replace the entire set of markup for the component, is that correct? Maybe that's more work than people want to do out of the box. Perhaps we could a styling configuration object instead, that would let you pass in classNames to use for each element, and doing so would turn off the default styles? Or simply a className prefix, and then we apply default suffixes to each element, and turn off the default styles. Or provide an option in the styling configuration object to keep or turn off default styles: e.g.
|
Sorry I don't want to accord a privilege about one styling solution on an other. A lot of people use CSS-in-JS solution right now and can't handle css files in their stack. For a major breaking change, I would like to let people choose to style the widget on their own with the solution they choose and do not force them to use css |
Fair enough, what if such a configuration option could contain class names or style text like you're using with the styledcomponents? |
I just remember there is a |
@xuopled |
You are right. Unfortunately I don't have so much time for now to work on this lib but I'm open to Pull Requests :) |
Thank you for this module. We'd like to be able to apply more styles to it using CSS, but it hasn't proven possible due to the way that styles are applied in this project.
I've made a fork that uses css classes instead of the current styling mechanism, and adds class names to every element. This makes it very easy to style.
https://github.com/karlvr/react-google-places-suggest
This removes the use of the
styled-components
dependency. I have put the default styles into asample.css
file. I figure that users can take what they'd like from those styles. I thought about trying to include it in the component build; couldn't work out how to; and it would make it a bit more work to override the existing styles.This is obviously quite a change, so I'm not sure that you'd like to merge this. Perhaps you can think of a way to retain the existing behaviour, while supporting a className-based styling model. Whatever happens, I'm interested in your thoughts on this!
Best,
Karl
The text was updated successfully, but these errors were encountered: