Skip to content

Instantly share code, notes, and snippets.

@Saifadin
Created December 17, 2018 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Saifadin/226a7e26fffe481974efc6b3e6780c6a to your computer and use it in GitHub Desktop.
Save Saifadin/226a7e26fffe481974efc6b3e6780c6a to your computer and use it in GitHub Desktop.
Why we use Css-in-JS 2
import styled from 'styled-components';
export const Button = styled('button')`
display: block;
align-items: center;
color: ${({ primary}) => primary ? 'blue' : 'white'};
...
`;
...
import { Button } from './styles';
<Button primary>
This is a Button
</Button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment