File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 4646 },
4747 "dependencies" : {
4848 "@ant-design/fast-color" : " ^3.0.0" ,
49- "@rc-component/util" : " ^1.2.1 " ,
49+ "@rc-component/util" : " ^1.3.0 " ,
5050 "classnames" : " ^2.2.6"
5151 },
5252 "devDependencies" : {
Original file line number Diff line number Diff line change 1- import { useMergedState } from '@rc-component/util' ;
1+ import { useControlledState } from '@rc-component/util' ;
22import { useMemo } from 'react' ;
33import type { Color } from '../color' ;
44import type { ColorGenInput } from '../interface' ;
@@ -10,7 +10,7 @@ const useColorState = (
1010 defaultValue : ColorValue ,
1111 value ?: ColorValue ,
1212) : [ Color , React . Dispatch < React . SetStateAction < Color > > ] => {
13- const [ mergedValue , setValue ] = useMergedState ( defaultValue , { value } ) ;
13+ const [ mergedValue , setValue ] = useControlledState ( defaultValue , value ) ;
1414
1515 const color = useMemo ( ( ) => generateColor ( mergedValue ) , [ mergedValue ] ) ;
1616
You can’t perform that action at this time.
0 commit comments