Commit e4f424b4 by Moorthy G

refactor: remove lib/merge-clx method as we have a builtin "cn" method in heroui

parent 774ee298
import clsx from 'clsx';
import { extendTailwindMerge } from 'tailwind-merge';
import type { ClassValue } from 'clsx';
const COMMON_UNITS = ['small', 'medium', 'large'];
/**
* We need to extend the tailwind merge to include NextUI's custom classes. *
* So we can use classes like `text-small` or `text-default-500` and override them.
*/
const twMerge = extendTailwindMerge({
extend: {
theme: {},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
'font-size': [{ text: ['tiny', ...COMMON_UNITS] }],
'bg-image': ['bg-stripe-gradient']
}
}
});
export default function mergeClsx(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
......@@ -26,7 +26,6 @@
"react": "^19.1.0",
"react-dom": "^19.1.0",
"sharp": "^0.34.2",
"tailwind-merge": "^3.3.1",
"tailwindcss": "^4.1.11",
"typescript": "^5.8.3"
},
......
......@@ -53,9 +53,6 @@ importers:
sharp:
specifier: ^0.34.2
version: 0.34.2
tailwind-merge:
specifier: ^3.3.1
version: 3.3.1
tailwindcss:
specifier: ^4.1.11
version: 4.1.11
......@@ -5586,9 +5583,6 @@ packages:
tailwind-merge@3.0.2:
resolution: {integrity: sha512-l7z+OYZ7mu3DTqrL88RiKrKIqO3NcpEO8V/Od04bNpvk0kiIFndGEoqfuzvj4yuhRkHKjRkII2z+KS2HfPcSxw==}
tailwind-merge@3.3.1:
resolution: {integrity: sha512-gBXpgUm/3rp1lMZZrM/w7D8GKqshif0zAymAhbCyIt8KMe+0v9DQ7cdYLR4FHH/cKpdTXb+A/tKKU3eolfsI+g==}
tailwind-variants@1.0.0:
resolution: {integrity: sha512-2WSbv4ulEEyuBKomOunut65D8UZwxrHoRfYnxGcQNnHqlSCp2+B7Yz2W+yrNDrxRodOXtGD/1oCcKGNBnUqMqA==}
engines: {node: '>=16.x', pnpm: '>=7.x'}
......@@ -12982,8 +12976,6 @@ snapshots:
tailwind-merge@3.0.2: {}
tailwind-merge@3.3.1: {}
tailwind-variants@1.0.0(tailwindcss@4.1.11):
dependencies:
tailwind-merge: 3.0.2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment