@teamix/typography
Version:
20 lines (18 loc) • 625 B
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["title", "children"];
import React from 'react';
import { Balloon } from '@alicloudfe/components';
var Tooltip = Balloon.Tooltip;
export default (function (_ref) {
var title = _ref.title,
children = _ref.children,
props = _objectWithoutPropertiesLoose(_ref, _excluded);
if (title) {
return /*#__PURE__*/React.createElement(Tooltip, _extends({
trigger: children,
align: "t"
}, props), title);
}
return children;
});