Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ es
coverage
yarn.lock
package-lock.json
pnpm-lock.yaml
.doc/
dist
.doc
Expand All @@ -34,4 +35,4 @@ dist
.dumi/tmp-test
.dumi/tmp-production

bun.lockb
bun.lockb
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
},
"dependencies": {
"@rc-component/util": "^1.3.0",
"classnames": "^2.2.5"
"clsx": "^2.1.1"
},
"devDependencies": {
"@rc-component/father-plugin": "^2.1.3",
"@rc-component/np": "^1.0.0",
"@rc-component/tooltip": "^1.2.1",
"@types/classnames": "^2.2.9",
"@types/jest": "^29.5.1",
"@types/node": "^24.5.2",
"@types/react": "^17.0.15",
"@types/react-dom": "^17.0.9",
"@umijs/fabric": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/Rate.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import useControlledState from '@rc-component/util/lib/hooks/useControlledState';
import KeyCode from '@rc-component/util/lib/KeyCode';
import pickAttrs from '@rc-component/util/lib/pickAttrs';
import classNames from 'classnames';
import { clsx } from 'clsx';
import React from 'react';
import type { StarProps } from './Star';
import Star from './Star';
Expand Down Expand Up @@ -221,7 +221,7 @@ function Rate(props: RateProps, ref: React.Ref<RateRef>) {
/>
));

const classString = classNames(prefixCls, className, {
const classString = clsx(prefixCls, className, {
[`${prefixCls}-disabled`]: disabled,
[`${prefixCls}-rtl`]: direction === 'rtl',
});
Expand Down
5 changes: 3 additions & 2 deletions src/Star.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import KeyCode from '@rc-component/util/lib/KeyCode';
import classNames from 'classnames';
import { clsx } from 'clsx';

export interface StarProps {
value?: number;
Expand Down Expand Up @@ -76,8 +76,9 @@ function Star(props: StarProps, ref: React.Ref<HTMLLIElement>) {

// >>>>> Node
const characterNode = typeof character === 'function' ? character(props) : character;

let start: React.ReactNode = (
<li className={classNames(Array.from(classNameList))} ref={ref}>
<li className={clsx(Array.from(classNameList))} ref={ref}>
<div
onClick={disabled ? null : onInternalClick}
onKeyDown={disabled ? null : onInternalKeyDown}
Expand Down