amis-rpc-design/node_modules/antd/es/typography/Base/EllipsisTooltip.js

22 lines
613 B
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
"use client";
import * as React from 'react';
import Tooltip from '../../tooltip';
const EllipsisTooltip = _ref => {
let {
enabledEllipsis,
isEllipsis,
children,
tooltipProps
} = _ref;
if (!(tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.title) || !enabledEllipsis) {
return children;
}
return /*#__PURE__*/React.createElement(Tooltip, Object.assign({
open: isEllipsis ? undefined : false
}, tooltipProps), children);
};
if (process.env.NODE_ENV !== 'production') {
EllipsisTooltip.displayName = 'EllipsisTooltip';
}
export default EllipsisTooltip;