Skip to content

Instantly share code, notes, and snippets.

@treyhuffine
Last active August 1, 2020 17:16
Show Gist options
  • Save treyhuffine/a100141a1d16f8aa11f73f62b9df0273 to your computer and use it in GitHub Desktop.
Save treyhuffine/a100141a1d16f8aa11f73f62b9df0273 to your computer and use it in GitHub Desktop.
import styled from 'styled-components';
import { blue } from '@carbon/colors';
export const SectionTitle = styled.h3`
margin-top: 1.5rem;
margin-bottom: 0.5rem;
`;
export const Paragraph = styled.p`
white-space: pre-wrap;
`;
export const Pill = styled.span`
display: inline-block;
margin-right: 0.75rem;
margin-bottom: 0.75rem;
padding: 0.5rem 1rem;
background-color: ${blue[20]};
color: ${blue[70]};
border-radius: 2px;
font-weight: bold;
`;
@treyhuffine
Copy link
Author

@DrBailey13 got it, I see the issue. So your file actually needs to be named styles.js. It's using styled-components for styling which is actually a JavaScript library. You write styles inside JavaScript but it uses CSS syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment