File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,8 @@ export type PatternOptions<
85
85
ConditionalVariants < Variants , ToggleVariants >
86
86
> ;
87
87
compoundVariants ?: Array <
88
- CompoundVariant < ConditionalVariants < Variants , ToggleVariants > >
88
+ | CompoundVariant < ConditionalVariants < Variants , ToggleVariants > >
89
+ | CompoundFnType < VariantGroups >
89
90
> ;
90
91
} ;
91
92
@@ -106,6 +107,16 @@ export type RulesVariants<RuleFn extends RuntimeFn<VariantGroups>> =
106
107
export type RecipeVariants < RecipeFn extends RuntimeFn < VariantGroups > > =
107
108
RulesVariants < RecipeFn > ;
108
109
110
+ type CompoundCondition < Variants extends VariantGroups > = {
111
+ [ K in keyof Variants ] : { [ key in keyof Variants [ K ] ] : string } ;
112
+ } ;
113
+ export type CompoundFnType < Variants extends VariantGroups > = (
114
+ context : Variants
115
+ ) => Array < {
116
+ condition : CompoundCondition < Variants > ;
117
+ style : RecipeStyleRule ;
118
+ } > ;
119
+
109
120
// == Tests ====================================================================
110
121
if ( import . meta. vitest ) {
111
122
const { describe, it, assertType, expectTypeOf } = import . meta. vitest ;
You can’t perform that action at this time.
0 commit comments