Last active
March 14, 2022 19:23
-
-
Save chunkydotdev/6546f733c44db37726060c8ea0712ee3 to your computer and use it in GitHub Desktop.
styled components using the open structured theme
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
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