v1.6.0
github-actions
released this
20 Aug 20:17
·
617 commits
to refs/heads/main
since this release
New Features
- Add support for arrays as argument by @dcastil in #127
- You can now use arbitrarily nested arrays as arguments to
twMerge
. That's especially handy for nested conditions.twMerge('…', someBool && ['…', anotherBool && '…'])
- The joining of arguments is done with a new
join
function which is present in the tailwind-merge exports as well. It has the same functionality as clsx but without support for objects as arguments which makes it a little faster. - Why no objects as arguments? You can read about my reasoning in https://github.com/dcastil/tailwind-merge/discussions/137#discussioncomment-3481605.
- You can now use arbitrarily nested arrays as arguments to
Bug Fixes
- Replace matchAll with exec by @dcastil in #133
- This makes tailwind-merge work in older browsers which don't support
String.prototype.matchAll()
- This makes tailwind-merge work in older browsers which don't support
Other
- Add recipes section to docs by @dcastil in #134
- Split docs into multiple files by @dcastil in #131
- Add comments to released PRs and their related issues by @dcastil in #130
- Add tests to check actual CJS and ESM package exports by @dcastil in #129
- Remove ts files from npm package by @dcastil in #128
Full Changelog: v1.5.1...v1.6.0
Thanks to @charkour for sponsoring tailwind-merge! ❤️