I need to declare both statements:
declare module "react" {
interface Attributes {
sx?: ThemeUIStyleObject;
}
}
and
declare module "react" {
interface Attributes {
sx?: SxStyleProp;
}
}
because if not, theme-ui errors appear in the sx prop.
I've tried this:
declare module "react" {
interface Attributes {
sx?: ThemeUIStyleObject | SxStyleProp;
}
}
but only works the first Object (ThemeUIStyleObject)
Try
&
to join this two types.