Skip to content

Commit

Permalink
chore(deps): bump tailwind-merge version (#3657)
Browse files Browse the repository at this point in the history
* chore(deps): bump tailwind-merge versions

* chore(theme): adopt latest extendTailwindMerge

* chore(changeset): add changeset

* chore(changeset): change to minor

* Update .changeset/grumpy-mayflies-rhyme.md

---------

Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
  • Loading branch information
wingkwong and jrgarciadev authored Nov 4, 2024
1 parent a4a1d8f commit ae73de1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-mayflies-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

bump `tailwind-merge` version (#3614)
2 changes: 1 addition & 1 deletion packages/core/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lodash.omit": "^4.5.0",
"clsx": "^1.2.1",
"tailwind-variants": "^0.1.20",
"tailwind-merge": "^1.14.0"
"tailwind-merge": "^2.5.2"
},
"peerDependencies": {
"tailwindcss": ">=3.4.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/theme/src/utils/cn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {twMergeConfig} from "./tw-merge-config";
*
* So we can use classes like `text-small` or `text-default-500` and override them.
*/
const twMerge = extendTailwindMerge(twMergeConfig);
const twMerge = extendTailwindMerge({extend: twMergeConfig});

export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
Expand Down
3 changes: 1 addition & 2 deletions packages/core/theme/src/utils/tw-merge-config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type {Config} from "tailwind-merge";
export const COMMON_UNITS = ["small", "medium", "large"];

export const twMergeConfig: Partial<Config> = {
export const twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
Expand Down
26 changes: 16 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ae73de1

Please sign in to comment.