Forked from carl0zen/simple-styled-components-example.js
Created
March 30, 2017 19:57
-
-
Save amowu/17d2bc043fa4f7e07cd2587a30c47c26 to your computer and use it in GitHub Desktop.
This file contains hidden or 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" | |
const Sky = styled.section` | |
${props => props.dusk && 'background-color: dusk' } | |
${props => props.day && 'background-color: white' } | |
${props => props.night && 'background-color: black' } | |
`; | |
// You can use it like so: | |
<Sky dusk /> | |
<Sky day /> | |
<Sky night /> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment