import classNames from 'classnames'; import { Popup } from 'rc-tooltip'; import * as React from 'react'; import type { TooltipProps } from '.'; import { ConfigContext } from '../config-provider'; import useStyle from './style'; import { parseColor } from './util'; export interface PurePanelProps extends Omit {} /** @private Internal Component. Do not use in your production. */ const PurePanel: React.FC = (props) => { const { prefixCls: customizePrefixCls, className, placement = 'top', title, color, overlayInnerStyle, } = props; const { getPrefixCls } = React.useContext(ConfigContext); const prefixCls = getPrefixCls('tooltip', customizePrefixCls); const [wrapCSSVar, hashId] = useStyle(prefixCls); // Color const colorInfo = parseColor(prefixCls, color); const arrowContentStyle = colorInfo.arrowStyle; const formattedOverlayInnerStyle: React.CSSProperties = { ...overlayInnerStyle, ...colorInfo.overlayStyle, }; const cls = classNames( hashId, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className, colorInfo.className, ); return wrapCSSVar(
{title}
, ); }; export default PurePanel;