diff --git a/app/_styles/utils.ts b/app/_styles/utils.ts new file mode 100644 index 0000000..16a6562 --- /dev/null +++ b/app/_styles/utils.ts @@ -0,0 +1,6 @@ +import { type ClassValue, clsx } from 'clsx' +import { twMerge } from 'tailwind-merge' + +export const cn = (...inputs: ClassValue[]) => { + return twMerge(clsx(inputs)) +} diff --git a/package.json b/package.json index 05d8589..994bb32 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,11 @@ "lint": "next lint" }, "dependencies": { + "clsx": "^2.0.0", "next": "14.0.4", "react": "^18", - "react-dom": "^18" + "react-dom": "^18", + "tailwind-merge": "^2.1.0" }, "devDependencies": { "@tailwindcss/forms": "^0.5.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7f80511..3db7aa6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,9 @@ settings: excludeLinksFromLockfile: false dependencies: + clsx: + specifier: ^2.0.0 + version: 2.0.0 next: specifier: 14.0.4 version: 14.0.4(react-dom@18.2.0)(react@18.2.0) @@ -14,6 +17,9 @@ dependencies: react-dom: specifier: ^18 version: 18.2.0(react@18.2.0) + tailwind-merge: + specifier: ^2.1.0 + version: 2.1.0 devDependencies: '@tailwindcss/forms': @@ -94,7 +100,6 @@ packages: engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.0 - dev: true /@eslint-community/eslint-utils@4.4.0(eslint@8.55.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} @@ -843,6 +848,11 @@ packages: resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} dev: false + /clsx@2.0.0: + resolution: {integrity: sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==} + engines: {node: '>=6'} + dev: false + /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -2516,7 +2526,6 @@ packages: /regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} - dev: true /regexp.prototype.flags@1.5.1: resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} @@ -2761,6 +2770,12 @@ packages: engines: {node: '>= 0.4'} dev: true + /tailwind-merge@2.1.0: + resolution: {integrity: sha512-l11VvI4nSwW7MtLSLYT4ldidDEUwQAMWuSHk7l4zcXZDgnCRa0V3OdCwFfM7DCzakVXMNRwAeje9maFFXT71dQ==} + dependencies: + '@babel/runtime': 7.23.5 + dev: false + /tailwindcss@3.3.6: resolution: {integrity: sha512-AKjF7qbbLvLaPieoKeTjG1+FyNZT6KaJMJPFeQyLfIp7l82ggH1fbHJSsYIvnbTFQOlkh+gBYpyby5GT1LIdLw==} engines: {node: '>=14.0.0'}