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<
8585 ConditionalVariants < Variants , ToggleVariants >
8686 > ;
8787 compoundVariants ?: Array <
88- CompoundVariant < ConditionalVariants < Variants , ToggleVariants > >
88+ | CompoundVariant < ConditionalVariants < Variants , ToggleVariants > >
89+ | CompoundFnType < VariantGroups >
8990 > ;
9091} ;
9192
@@ -106,6 +107,16 @@ export type RulesVariants<RuleFn extends RuntimeFn<VariantGroups>> =
106107export type RecipeVariants < RecipeFn extends RuntimeFn < VariantGroups > > =
107108 RulesVariants < RecipeFn > ;
108109
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+
109120// == Tests ====================================================================
110121if ( import . meta. vitest ) {
111122 const { describe, it, assertType, expectTypeOf } = import . meta. vitest ;
You can’t perform that action at this time.
0 commit comments