You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to, for scope reasons, add a new set of components to an app that has a new theme. This new theme has a different type signature than the old theme. The old theme is set up using the Typescript docs for styled-components and the components using it import from styled-components, not xstyled.
How can I go about doing this? I tried re-exporting the x and styled export but it looks like the X type still refers to the DefaultTheme type for some reason.
import{system,StyleGenerator,SystemProps}from'@xstyled/system';import{createCss}from'@xstyled/styled-components';import*asstyledComponentsfrom'styled-components';import{ITheme}from'./theme';// new theme typeconstmodule=createCss<StyleGenerator<SystemProps<ITheme>>>(system);exportconstcss=module.css;exportconststyled=module.styled;exportconstx=module.xasany;
Essentially, instead of overriding the types using a declaration file I would like to re-export them with the correct theme and create components using that new component.
The text was updated successfully, but these errors were encountered:
I am trying to, for scope reasons, add a new set of components to an app that has a new theme. This new theme has a different type signature than the old theme. The old theme is set up using the Typescript docs for styled-components and the components using it import from styled-components, not xstyled.
How can I go about doing this? I tried re-exporting the
x
andstyled
export but it looks like the X type still refers to the DefaultTheme type for some reason.Essentially, instead of overriding the types using a declaration file I would like to re-export them with the correct theme and create components using that new component.
The text was updated successfully, but these errors were encountered: