Skip to content

Instantly share code, notes, and snippets.

@carl0zen
Created January 3, 2017 15:37
Show Gist options
  • Save carl0zen/b1bbf0b9ab60807c9e8f74902a55a97e to your computer and use it in GitHub Desktop.
Save carl0zen/b1bbf0b9ab60807c9e8f74902a55a97e to your computer and use it in GitHub Desktop.
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