React Styled Components - transform scale with props
I am trying to style a navbar and I want a menu to transition open. I am trying to do this by passing a prop to the styled component and then setting the value of transform based on the prop, however I cannot see to figure out the syntax to use a prop in the styled prop. Here's the code: <MenuContainer display={showMobileMenu ? '' : 'none'}> <UL> <LI><A showMobileMenu={showMobileMenu} href="#">Sign in with Github</A></LI> <LI><A showMobileMenu={showMobileMenu} href="#">New Snippet</A></LI> </UL> </MenuContainer> . . . const MenuContainer = styled.nav` position: absolute; text-align: right; top
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.