diff --git a/src/types.ts b/src/types.ts index c5d278e..79927d7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -5,9 +5,31 @@ interface IBaseCssValue { base?: T; } -export type StyleProps = T extends (props: infer R) => any +export type InferPropsFromFunctionArgument = T extends ( + props: infer R, +) => any ? R extends { theme?: any } ? Pick> : R - : never; + : {}; + +export type StyleProps< + T1, + T2 = {}, + T3 = {}, + T4 = {}, + T5 = {}, + T6 = {}, + T7 = {}, + T8 = {}, + T9 = {} +> = InferPropsFromFunctionArgument & + InferPropsFromFunctionArgument & + InferPropsFromFunctionArgument & + InferPropsFromFunctionArgument & + InferPropsFromFunctionArgument & + InferPropsFromFunctionArgument & + InferPropsFromFunctionArgument & + InferPropsFromFunctionArgument & + InferPropsFromFunctionArgument; export type ResponsivePropValue = { [P in Extract]?: ValueType