Skip to content

Commit

Permalink
fix(system-rsc): incorrect VariantValue typing and typo in Options
Browse files Browse the repository at this point in the history
  • Loading branch information
wingkwong committed Aug 17, 2024
1 parent beff335 commit c4592c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/core/system-rsc/src/extend-variants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ type ComposeVariants<CP, S> = SuggestedVariants<CP, S> | Variants<S>;

type VariantValue<V, SV> = {
[K in keyof V | keyof SV]?:
| (K extends keyof V ? StringToBoolean<keyof V[K]> | (keyof V[K])[] : never)
| (K extends keyof V ? StringToBoolean<keyof V[K]> : never)
| (K extends keyof V ? StringToBoolean<keyof V[K]>[] : never)
| (K extends keyof SV
? ValidateSubtype<SV[K], object> extends "true"
? keyof OmitUndefined<SV[K]> | (keyof OmitUndefined<SV[K]>)[] | undefined
? keyof OmitUndefined<SV[K]>
: never
: never);
};
Expand All @@ -47,7 +48,7 @@ type CompoundVariants<V, SV> = Array<VariantValue<V, SV> & ClassProp<ClassValue>
type Options = {
/**
* Whether to merge the class names with `tailwind-merge` library.
* It's avoided to have duplicate tailwind classes. (Recommended)
* It avoids to have duplicate tailwind classes. (Recommended)
* @see https://github.com/dcastil/tailwind-merge/blob/v1.8.1/README.md
* @default true
*/
Expand Down

0 comments on commit c4592c9

Please sign in to comment.