Browse Source

type: update unknown with SliderRef (#43094)

pull/43097/head
lijianan 1 year ago
committed by GitHub
parent
commit
33fab22b96
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      components/slider/SliderTooltip.tsx

7
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;

Loading…
Cancel
Save