Skip to content

Commit

Permalink
Remove tailwind-merge, use classnames instead
Browse files Browse the repository at this point in the history
  • Loading branch information
cgero-eth committed Jul 11, 2023
1 parent da707e2 commit 0eb89c4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = {
version: 'detect',
},
tailwindcss: {
callees: ['classnames', 'clsx', 'ctl', 'twMerge'],
callees: ['classnames', 'classNames', 'clsx', 'ctl'],
config: tailwindConfig,
},
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
],
"author": "Aragon Association",
"dependencies": {
"tailwind-merge": "^1.13.2"
"classnames": "^2.3.2"
},
"peerDependencies": {
"react": ">=17",
Expand Down
4 changes: 2 additions & 2 deletions src/components/tag/tag.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import classNames from 'classnames';
import React from 'react';
import { twMerge } from 'tailwind-merge';
import type { ITagProps, TagColorScheme } from './tag.api';

const colorSchemeClass: Record<TagColorScheme, string> = {
Expand All @@ -14,7 +14,7 @@ const colorSchemeClass: Record<TagColorScheme, string> = {
export const Tag: React.FC<ITagProps> = (props) => {
const { children, colorScheme = 'neutral', className } = props;

const classes = twMerge(
const classes = classNames(
'flex py-0.1 px-0.5 font-bold text-center rounded ft-text-sm',
colorSchemeClass[colorScheme],
className,
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4294,6 +4294,11 @@ cjs-module-lexer@^1.0.0:
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107"
integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==

classnames@^2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924"
integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==

clean-css@^5.2.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.2.tgz#70ecc7d4d4114921f5d298349ff86a31a9975224"
Expand Down Expand Up @@ -10006,11 +10011,6 @@ synchronous-promise@^2.0.15:
resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.17.tgz#38901319632f946c982152586f2caf8ddc25c032"
integrity sha512-AsS729u2RHUfEra9xJrE39peJcc2stq2+poBXX8bcM08Y6g9j/i/PUzwNQqkaJde7Ntg1TO7bSREbR5sdosQ+g==

tailwind-merge@^1.13.2:
version "1.13.2"
resolved "https://registry.yarnpkg.com/tailwind-merge/-/tailwind-merge-1.13.2.tgz#1d06c9e95ffda2320efc50ed33c65be0cda23091"
integrity sha512-R2/nULkdg1VR/EL4RXg4dEohdoxNUJGLMnWIQnPKL+O9Twu7Cn3Rxi4dlXkDzZrEGtR+G+psSXFouWlpTyLhCQ==

tailwindcss-fluid-type@^1.0.0:
version "1.3.3"
resolved "https://registry.yarnpkg.com/tailwindcss-fluid-type/-/tailwindcss-fluid-type-1.3.3.tgz#f0c85ac1bb36446e2703856ec46e29ac86e5a6d1"
Expand Down

0 comments on commit 0eb89c4

Please sign in to comment.