Skip to content

Commit

Permalink
feat(tailwindbuddy): fix typescript compound variant
Browse files Browse the repository at this point in the history
  • Loading branch information
flozero committed Sep 10, 2024
1 parent faca488 commit 8ce6ec2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/core/src/types/variants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ export type VariantValue<S extends Slots> =

export type CompoundVariant<V extends Variants<S>, S extends Slots> = {
conditions: {
[K in keyof V]?: V[K] extends Record<string, any>
? keyof V[K] | (keyof V[K])[]
: never;
[K in keyof V]?:
| (K extends keyof V ? keyof V[K] : never)
| (K extends keyof V ? keyof V[K] : never)[]
| boolean;
} & {
[K in string]?: string | string[] | boolean;
};
class: VariantValue<S>;
class: string | string[] | Record<string, string | string[]>;
};

export type ResponsiveVariant<V, Sc extends string, K extends keyof V> = {
Expand Down

0 comments on commit 8ce6ec2

Please sign in to comment.