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

Properly strict classGroups keys #314

Closed
KajSzy opened this issue Sep 22, 2023 · 1 comment
Closed

Properly strict classGroups keys #314

KajSzy opened this issue Sep 22, 2023 · 1 comment
Labels
context-v1 Related to tailwind-merge v1

Comments

@KajSzy
Copy link

KajSzy commented Sep 22, 2023

Describe the bug

Using extendTailwindMerge I've to check source code to see proper classGroups keys to properly handle custom classes.

To Reproduce

const twMerge = extendTailwindMerge({
  classGroups: {
    // here keys should be defined as strict 
    'min-h': [{ 'min-h': ['page'] }],
  },
});

Expected behavior

Types for classGroups, conflictingClassGroups and conflictingClassGroupModifiers should properly strict keys.

Environment

  • tailwind-merge version: [e.g. 1.14.0]

Additional context

type ClassGroupId should be an union of all keys that I can found here

@dcastil
Copy link
Owner

dcastil commented Sep 23, 2023

Hey @KajSzy! 👋

Good news, this is already done and will be released in an upcoming v2 release.

I'm closing this issue, let me know if this doesn't solve your problem.

@dcastil dcastil closed this as completed Sep 23, 2023
@dcastil dcastil added the context-v1 Related to tailwind-merge v1 label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context-v1 Related to tailwind-merge v1
Projects
None yet
Development

No branches or pull requests

2 participants