Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (process.env.NODE_ENV !== 'production' && args[0][0] === undefined) {
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR)
}
styles.push(args[0][0])
let len = args.length
let i = 1
for (; i < len; i++) {
if (process.env.NODE_ENV !== 'production' && args[0][i] === undefined) {
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR)
}
styles.push(args[i], args[0][i])
}
}
// $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class
const Styled: PrivateStyledComponent<p> = withEmotionCache(
(props, context, ref) => {
return (
{theme => {
const finalTag = (shouldUseAs && props.as) || baseTag
let className = ''
let classInterpolations = []
let mergedProps = props
if (props.theme == null) {
mergedProps = {}
for (let key in props) {
mergedProps[key] = props[key]
}
mergedProps.theme = theme
}</p>
css,
jsx,
keyframes,
withEmotionCache
} from '@emotion/core'
;
interface TestTheme0 {
resetStyle: any
}
; [theme.resetStyle]} />
declare const getRandomColor: () => string
const ComponentWithCache = withEmotionCache((_props: {}, context) => {
return (
<div>
context.sheet.insert(`div { backgroundColor: ${getRandomColor()} }`)
}
/>
)
})
; {}} />
;<div>
<h1>
This is really big</h1></div></div>