Skip to content

Commit

Permalink
fix(system-rsc): missing StringToBoolean<keyof V[K]>[] (#3559)
Browse files Browse the repository at this point in the history
* fix(navbar): fixed the height when style h-full

* fix(navbar): fixed the height when style h-full

* fix(core): string[] accepted by compoundVariants.variant

* Delete .changeset/brown-days-applaud.md

* chore(changeset): revise changeset message

* fix(system-rsc): incorrect VariantValue typing and typo in Options

---------

Co-authored-by: WK Wong <[email protected]>
  • Loading branch information
awesome-pro and wingkwong authored Aug 29, 2024
1 parent a254abf commit 44e89a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nice-beans-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/system-rsc": patch
---

added missing `StringToBoolean<keyof V[K]>[]` (#3530)
3 changes: 2 additions & 1 deletion packages/core/system-rsc/src/extend-variants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ 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]> : never)
| (K extends keyof V ? StringToBoolean<keyof V[K]>[] : never)
| (K extends keyof SV
? ValidateSubtype<SV[K], object> extends "true"
? keyof OmitUndefined<SV[K]>
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 avoid 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 44e89a0

Please sign in to comment.