Created
June 24, 2020 07:37
-
-
Save niikkiin/06db35f1231c68f2defad80a0dfe6f43 to your computer and use it in GitHub Desktop.
Basic Dashboard Using styled-components
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'; | |
export const Container = styled.div` | |
display: grid; | |
grid-template-columns: 24rem 1fr; | |
grid-template-rows: 5rem 1fr 5rem; | |
grid-template-areas: | |
'sidebar header' | |
'sidebar main' | |
'sidebar footer'; | |
height: 100vh; | |
background-color: yellow; | |
`; | |
export const Sidebar = styled.aside` | |
background-color: pink; | |
grid-area: sidebar; | |
`; | |
export const Header = styled.header` | |
background-color: blue; | |
grid-area: header; | |
`; | |
export const Main = styled.header` | |
background-color: orange; | |
grid-area: main; | |
`; | |
export const Footer = styled.div` | |
background-color: green; | |
grid-area: content; | |
grid-area: footer; | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment