question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apply new styles usin styled-components

See original GitHub issue

Hey, I’m trying to apply new styles to the NavIcon element `import styled from ‘styled-components’;

const StyledNavIcon = styled(NavIcon) width: 30px;;`

But when I use the new element I’m unable to see the child elements <StyledNavIcon><FontAwesome name="th" size="x2" /></StyledNavIcon>

Any insight ?

Thank you

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Tzeloncommented, Apr 23, 2017

Thanks works great

1reaction
wmiracommented, Apr 23, 2017

@Tzelon I have published 2.1.1 where NavIcon and NavText now supports overriding style and className

<NavIcon style={{yourstyle}} className='yourclassName'></NavIcon>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Usage - styled-components
styled -components generates an actual stylesheet with classes, and attaches those classes to the DOM nodes of styled components via the className prop....
Read more >
How To Use Styled-Components In React - Smashing Magazine
In this article, you'll learn the basics of styled components and how to properly apply them to your React applications. You should have...
Read more >
How To Use React Styled Components Efficiently - Copycat
Using styled-components makes it simple to use actual CSS to style components by writing JavaScript code. These components are known as ...
Read more >
Complete Guide On How To Use Styled-components In React
With styled-components you can organize the styles/theme of your entire project. Setting up variables like sizes, colors, font families has been ...
Read more >
How To Add Styles To React Components With Styled ...
As a React Front-End developer, you sometimes need to take an existing React component and apply extra styles to it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found