diff --git a/packages/react/src/index.tsx b/packages/react/src/index.tsx index 5bd15384..f0393e3b 100644 --- a/packages/react/src/index.tsx +++ b/packages/react/src/index.tsx @@ -117,13 +117,14 @@ export type TStyled = { // tslint:disable-next-line: callable-types < TagOrComponent extends keyof JSX.IntrinsicElements | React.ComponentType | IStyledComponent, - BaseAndVariantStyles extends TComponentStylesObject + BaseAndVariantStyles extends TComponentStylesObject, + Variants = TExtractVariants >( tag: TagOrComponent, baseStyles: BaseAndVariantStyles | TComponentStylesObject - ): TagOrComponent extends IStyledComponent - ? TagOrComponent - : IStyledComponent, Config>; + ): TagOrComponent extends IStyledComponent + ? IStyledComponent & Variants, Config> + : IStyledComponent; } & TProxyStyledElements; const createCompoundVariantsMatcher = (breakPoints: any, existingMap?: any) => {