@@ -3,17 +3,14 @@ import type { ElementType } from 'react'
33import { BoxElements } from '@xstyled/core'
44import { string } from '@xstyled/util'
55import { StyleGenerator , StyleGeneratorProps , Theme } from '@xstyled/system'
6- import scStyled , {
6+ import {
77 StyledConfig ,
88 ThemedBaseStyledInterface ,
99 ThemedStyledFunction ,
1010} from 'styled-components'
11+ import { scStyled } from './scStyled'
1112import { createCssFunction , XCSSFunction } from './createCssFunction'
1213
13- const scStyledInterop =
14- // @ts -ignore
15- typeof scStyled === 'function' ? scStyled : scStyled . default
16-
1714const getCreateStyle = (
1815 baseCreateStyle : ThemedStyledFunction < any , any > ,
1916 css : XCSSFunction ,
@@ -80,7 +77,7 @@ export const createBaseStyled = <TGen extends StyleGenerator>(
8077 }
8178 : { }
8279 return ( ( component : Parameters < typeof scStyled > [ 0 ] ) => {
83- const baseStyled = scStyledInterop ( component )
80+ const baseStyled = scStyled ( component )
8481 return getCreateStyle (
8582 config ? baseStyled . withConfig ( config ) : baseStyled ,
8683 css ,
@@ -96,7 +93,7 @@ export const createStyled = <TGen extends StyleGenerator>(
9693 const styled = createBaseStyled ( css )
9794 const xstyled = createBaseStyled ( css , generator )
9895 styled . box = xstyled ( 'div' )
99- Object . keys ( scStyledInterop ) . forEach ( ( key ) => {
96+ Object . keys ( scStyled ) . forEach ( ( key ) => {
10097 // @ts -ignore
10198 styled [ key ] = styled ( key )
10299 // @ts -ignore
0 commit comments