|
1 | 1 | import * as React from 'react'; |
2 | 2 | import RcTooltip from '@rc-component/tooltip'; |
3 | | -import type { placements as Placements } from '@rc-component/tooltip/lib/placements'; |
4 | | -import type { |
5 | | - TooltipProps as RcTooltipProps, |
6 | | - TooltipRef as RcTooltipRef, |
7 | | -} from '@rc-component/tooltip/lib/Tooltip'; |
8 | 3 | import type { BuildInPlacements } from '@rc-component/trigger'; |
9 | 4 | import { useControlledState } from '@rc-component/util'; |
10 | 5 | import { clsx } from 'clsx'; |
@@ -33,6 +28,10 @@ import useStyle from './style'; |
33 | 28 | import UniqueProvider from './UniqueProvider'; |
34 | 29 | import { parseColor } from './util'; |
35 | 30 |
|
| 31 | +type RcTooltipProps = React.ComponentPropsWithoutRef<typeof RcTooltip>; |
| 32 | +type RcTooltipRef = React.ComponentRef<typeof RcTooltip>; |
| 33 | +type Placements = NonNullable<RcTooltipProps['builtinPlacements']>; |
| 34 | + |
36 | 35 | export type { AdjustOverflow, PlacementsConfig }; |
37 | 36 |
|
38 | 37 | export interface TooltipRef { |
@@ -110,7 +109,7 @@ export interface AbstractTooltipProps extends LegacyTooltipProps { |
110 | 109 | rootClassName?: string; |
111 | 110 | color?: LiteralUnion<PresetColorType>; |
112 | 111 | placement?: TooltipPlacement; |
113 | | - builtinPlacements?: typeof Placements; |
| 112 | + builtinPlacements?: Placements; |
114 | 113 | openClassName?: string; |
115 | 114 | arrow?: boolean | { pointAtCenter?: boolean }; |
116 | 115 | autoAdjustOverflow?: boolean | AdjustOverflow; |
|
0 commit comments