|
2 | 2 | import * as React from 'react'; |
3 | 3 | import { clsx } from 'clsx'; |
4 | 4 | import raf from '@rc-component/util/lib/raf'; |
5 | | -import SemanticContext from './SemanticContext'; |
6 | 5 |
|
7 | 6 | /** |
8 | 7 | * When click and hold on a button - the speed of auto changing the value. |
@@ -36,8 +35,6 @@ export default function StepHandler({ |
36 | 35 | const onStepRef = React.useRef<StepHandlerProps['onStep']>(); |
37 | 36 | onStepRef.current = onStep; |
38 | 37 |
|
39 | | - const { classNames, styles } = React.useContext(SemanticContext) || {}; |
40 | | - |
41 | 38 | const onStopStep = () => { |
42 | 39 | clearTimeout(stepTimeoutRef.current); |
43 | 40 | }; |
@@ -73,7 +70,7 @@ export default function StepHandler({ |
73 | 70 | // ======================= Render ======================= |
74 | 71 | const handlerClassName = `${prefixCls}-handler`; |
75 | 72 |
|
76 | | - const className = clsx(handlerClassName, `${handlerClassName}-up`, { |
| 73 | + const className = clsx(handlerClassName, `${handlerClassName}-${action}`, { |
77 | 74 | [`${handlerClassName}-${action}-disabled`]: disabled, |
78 | 75 | }); |
79 | 76 |
|
@@ -104,10 +101,4 @@ export default function StepHandler({ |
104 | 101 | {children || <span unselectable="on" className={`${prefixCls}-handler-${action}-inner`} />} |
105 | 102 | </span> |
106 | 103 | ); |
107 | | - |
108 | | - return ( |
109 | | - <div className={clsx(`${handlerClassName}-wrap`, classNames?.actions)} style={styles?.actions}> |
110 | | - // |
111 | | - </div> |
112 | | - ); |
113 | 104 | } |
0 commit comments