Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: VariantProps doesn't type responsiveVariants in global configura… #160

Merged

Conversation

hoangdevnull
Copy link
Contributor

@hoangdevnull hoangdevnull commented Feb 15, 2024

Description

Fixes: #131

Resolved typescript issue with VariantProps not including responsiveVariants when utilizing createTV with defaultConfig by ensuring responsiveVariants is correctly typed in TVReturnType. I've also added a couple of tests which cover the case that currently fails.

A new CreateTV type has been introduced to ensure that this update does not interfere with users who employ tv as their primary function.

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Follow the Style Guide.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).

src/__tests__/createTV.test.ts Outdated Show resolved Hide resolved
src/index.d.ts Show resolved Hide resolved
@mskelton mskelton force-pushed the fix-responsive-variants-on-create-tv branch from b0dd8d4 to 8360015 Compare February 23, 2024 13:09
@mskelton mskelton merged commit ad727e0 into nextui-org:main Feb 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VariantProps doesn't type responsiveVariants in global configuration
2 participants