11import * as React from 'react'
2- import emStyled , { CreateStyledComponent , CreateStyled } from '@emotion/styled'
2+ import { CreateStyledComponent , CreateStyled } from '@emotion/styled'
33import { Theme } from '@emotion/react'
44import { StyleGenerator , StyleGeneratorProps } from '@xstyled/system'
55import { BoxElements } from '@xstyled/core'
66import { createCssFunction , XCSSFunction } from './createCssFunction'
7-
8- const emStyledInterop =
9- // @ts -ignore
10- typeof emStyled === 'function' ? emStyled : emStyled . default
7+ import { emStyled } from './emStyled'
118
129const flattenArgs = ( arg : any , props : any ) : any => {
1310 if ( typeof arg === 'function' ) return flattenArgs ( arg ( props ) , props )
@@ -69,7 +66,7 @@ export const createBaseStyled = <TGen extends StyleGenerator>(
6966 : { }
7067 return ( ( component : any , options : any ) =>
7168 getCreateStyle (
72- emStyledInterop ( component , { ...defaultOptions , ...options } ) ,
69+ emStyled ( component , { ...defaultOptions , ...options } ) ,
7370 css ,
7471 generator ,
7572 ) ) as XStyled < TGen >
@@ -82,7 +79,7 @@ export const createStyled = <TGen extends StyleGenerator>(
8279 const styled = createBaseStyled ( css )
8380 const xstyled = createBaseStyled ( css , generator )
8481 styled . box = xstyled ( 'div' )
85- Object . keys ( emStyledInterop ) . forEach ( ( key ) => {
82+ Object . keys ( emStyled ) . forEach ( ( key ) => {
8683 // @ts -ignore
8784 styled [ key ] = styled ( key )
8885 // @ts -ignore
0 commit comments