-
Notifications
You must be signed in to change notification settings - Fork 104
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
Styled-components on text and Icons don't seem to work. #64
Comments
For the icons you can put directly the component of the icon inside Example : // inside the SideNav
|
I managed to style icons and text in the same manner as the included example: https://github.com/trendmicro-frontend/react-sidenav/tree/master/examples/Styled Overall does using I would definitely prefer the simplicity of plain old CSS - let us override styles with regular classes like Btw, here is a related library which is an extreme opposite with regards to dependencies: https://github.com/wmira/react-sidenav Only React, although it does not provide as much "out of the box", thus 23KB vs 122KB. |
@SurealCereal Can you please elaborate on how you were able to style the text? I am trying to style the passive color of the text in the example you linked when it is not selected or being hovered on. Here is a screenshot of my sidebar:
I tried to change the color using styled-components on NavItem as follows but it didn't work.:
I am not sure how the syntax works when styling components with styled-components. |
I tried changing the styled component of the NavText, changing it's color doesn't do anything at all.
But for some some reason passing a style object to the style prop works fine
but this does not work:
how come one of them works and the other doesn't?
The text was updated successfully, but these errors were encountered: