Skip to content

Instantly share code, notes, and snippets.

@chunkydotdev
Last active March 14, 2022 19:23
Show Gist options
  • Save chunkydotdev/6546f733c44db37726060c8ea0712ee3 to your computer and use it in GitHub Desktop.
Save chunkydotdev/6546f733c44db37726060c8ea0712ee3 to your computer and use it in GitHub Desktop.
styled components using the open structured theme
import styled from 'styled-components'
import { Colors, Spacings } from '../theme.ts'
const PrimaryButton = styled.button`
background-color: ${Colors.primary};
border: 0;
margin-bottom: ${Spacings.md};
`
const Component1 = () => {
return <>
<h1>Below there will be a button that is using the primary colors from our theme</h1>
<PrimaryButton>Click me</PrimaryButton>
<p>There is some margin above me</p>
</>
}
export default Component1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment