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

Explain how to use validators correctly #419

Open
dcastil opened this issue May 22, 2024 · 0 comments
Open

Explain how to use validators correctly #419

dcastil opened this issue May 22, 2024 · 0 comments
Labels
context-v2 Related to tailwind-merge v2 documentation Improvements or additions to documentation feature Is new feature

Comments

@dcastil
Copy link
Owner

dcastil commented May 22, 2024

In #418 (comment) @ozguruysal used the entire class in a validator which won't get the results he expected.

const twMerge = extendTailwindMerge({
  extend: {
    classGroups: {
      "font-size": [(classPart: string) => /^text-label-*/.test(classPart)],
    },
  },
})

I should write about how rules from the config are applied and in which order and derive from that how to best use validators.

@dcastil dcastil added documentation Improvements or additions to documentation feature request context-v2 Related to tailwind-merge v2 labels May 22, 2024
@dcastil dcastil added feature Is new feature and removed feature request labels Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context-v2 Related to tailwind-merge v2 documentation Improvements or additions to documentation feature Is new feature
Projects
None yet
Development

No branches or pull requests

1 participant