UNPKG

styled-components

Version:

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

11 lines (9 loc) • 291 B
// @flow import getComponentName from './getComponentName' import isTag from './isTag' import type { Target } from '../types' export default function generateDisplayName(target: Target): string { return isTag(target) ? `styled.${target}` : `Styled(${getComponentName(target)})` }