mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 06:03:38 +08:00
type: update unknown with SliderRef (#43094)
This commit is contained in:
parent
feb8c569e1
commit
33fab22b96
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user