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
// this file is just here to change the name of the gist | |
import React from 'react' | |
import styled from 'styled-components' | |
const makeResponsiveComponent = (rulesets, tagName = 'div') => | |
styled(tagName)`${buildStyles(rulesets)}` | |
const buildStyles = rulesets => | |
rulesets.reduce( | |
(cssString, { constraint, width, rules }) => |