Created
January 2, 2020 20:12
-
-
Save audiolion/b1df50a71cf7b8b2a0a949a1fdc7bf87 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div css={{ | |
color: 'red', | |
...(isActive ? color: 'blue' : {}), | |
}} /> | |
<div css={[ | |
{ color: 'red' }, | |
isActive ? { color: 'blue' } : undefined, | |
]} /> | |
const activeStyle = css({ color: 'blue' }) | |
<div css={[ | |
{ color: 'red' }, | |
isActive ? activeStyle : undefined, | |
]} /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment