Skip to content

Instantly share code, notes, and snippets.

@Saifadin
Created Dec 17, 2018
Embed
What would you like to do?
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