Skip to content

Commit c715b1f

Browse files
committed
perf: uninstall classnames, install clsx
1 parent 11a6251 commit c715b1f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@
4747
},
4848
"dependencies": {
4949
"@rc-component/util": "^1.3.0",
50-
"classnames": "^2.3.2"
50+
"clsx": "^2.1.1"
5151
},
5252
"devDependencies": {
5353
"@rc-component/father-plugin": "^2.1.3",
5454
"@rc-component/np": "^1.0.0",
5555
"@testing-library/jest-dom": "^6.1.5",
5656
"@testing-library/react": "^14.1.2",
5757
"@testing-library/user-event": "^14.4.3",
58-
"@types/classnames": "^2.3.1",
5958
"@types/jest": "^29.2.4",
59+
"@types/node": "^24.5.2",
6060
"@types/react": "^18.0.26",
6161
"@types/react-dom": "^18.0.9",
6262
"@umijs/fabric": "^4.0.1",

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import useControlledState from '@rc-component/util/lib/hooks/useControlledState';
2-
import classNames from 'classnames';
2+
import { clsx } from 'clsx';
33
import * as React from 'react';
44
import { forwardRef, useImperativeHandle, useRef } from 'react';
55

@@ -57,7 +57,7 @@ export const Checkbox = forwardRef<CheckboxRef, CheckboxProps>((props, ref) => {
5757
nativeElement: holderRef.current,
5858
}));
5959

60-
const classString = classNames(prefixCls, className, {
60+
const classString = clsx(prefixCls, className, {
6161
[`${prefixCls}-checked`]: rawValue,
6262
[`${prefixCls}-disabled`]: disabled,
6363
});

0 commit comments

Comments
 (0)