UNPKG

styled-components

Version:

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

15 lines (11 loc) • 404 B
// @flow import type { Target } from '../types' import domElements from '../utils/domElements' export default (styledComponent: Function, constructWithOptions: Function) => { const styled = (tag: Target) => constructWithOptions(styledComponent, tag) // Shorthands for all valid HTML Elements domElements.forEach(domElement => { styled[domElement] = styled(domElement) }) return styled }