Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Raffael Wannenmacher committed Jan 16, 2024
1 parent d12b654 commit f77674d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/mui-styled-engine-sc/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import * as CSS from 'csstype';
import * as hoistNonReactStatics from 'hoist-non-react-statics';
import { DefaultTheme } from 'styled-components';

type WithOptionalTheme<P extends { theme?: T | undefined }, T> = OmitU<P, 'theme'> & {
theme?: T | undefined;
Expand Down Expand Up @@ -272,6 +273,26 @@ export interface ThemedStyledFunctionBase<
): StyledComponent<C, T, O & U, A>;
}

type RuleSet<Props> = Interpolation<Props>[];

declare function css(
styles:
| TemplateStringsArray
| CSSObject
| InterpolationFunction<ThemedStyledProps<object, DefaultTheme>>,
...interpolations: Interpolation<ThemedStyledProps<object, DefaultTheme>>[]
): RuleSet<ThemedStyledProps<object, DefaultTheme>>;

declare function css<Props extends object>(
styles:
| TemplateStringsArray
| CSSObject
| InterpolationFunction<ThemedStyledProps<Props, DefaultTheme>>,
...interpolations: Interpolation<ThemedStyledProps<Props, DefaultTheme>>[]
): RuleSet<ThemedStyledProps<Props, DefaultTheme>>;

export { css };

// same as ThemedStyledFunction in styled-components, but without attrs, and withConfig
export interface ThemedStyledFunction<
C extends keyof JSX.IntrinsicElements | React.ComponentType<any>,
Expand Down

0 comments on commit f77674d

Please sign in to comment.