lijianan
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
1 deletions
-
components/slider/SliderTooltip.tsx
|
|
@ -1,3 +1,4 @@ |
|
|
|
import type { SliderRef } from 'rc-slider/lib/Slider'; |
|
|
|
import raf from 'rc-util/lib/raf'; |
|
|
|
import { composeRef } from 'rc-util/lib/ref'; |
|
|
|
import * as React from 'react'; |
|
|
@ -5,7 +6,7 @@ import { useRef } from 'react'; |
|
|
|
import type { TooltipProps } from '../tooltip'; |
|
|
|
import Tooltip from '../tooltip'; |
|
|
|
|
|
|
|
const SliderTooltip = React.forwardRef<unknown, TooltipProps>((props, ref) => { |
|
|
|
const SliderTooltip = React.forwardRef<SliderRef, TooltipProps>((props, ref) => { |
|
|
|
const { open } = props; |
|
|
|
const innerRef = useRef<any>(null); |
|
|
|
|
|
|
@ -36,4 +37,8 @@ const SliderTooltip = React.forwardRef<unknown, TooltipProps>((props, ref) => { |
|
|
|
return <Tooltip ref={composeRef(innerRef, ref)} {...props} />; |
|
|
|
}); |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
SliderTooltip.displayName = 'SliderTooltip'; |
|
|
|
} |
|
|
|
|
|
|
|
export default SliderTooltip; |
|
|
|