antd
Version:
An enterprise-class UI design language and React components implementation
52 lines (48 loc) • 1.81 kB
JavaScript
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import { genComponentStyleHook } from '../../theme'; // =============================== Base ===============================
var genBaseStyle = function genBaseStyle(token) {
var _$concat, _componentCls;
var componentCls = token.componentCls,
iconCls = token.iconCls,
zIndexPopup = token.zIndexPopup,
colorText = token.colorText,
colorWarning = token.colorWarning,
marginXS = token.marginXS,
fontSize = token.fontSize,
lineHeight = token.lineHeight;
return _defineProperty({}, componentCls, (_componentCls = {
zIndex: zIndexPopup
}, _defineProperty(_componentCls, "".concat(componentCls, "-inner-content"), {
color: colorText
}), _defineProperty(_componentCls, "".concat(componentCls, "-message"), (_$concat = {
position: 'relative',
marginBottom: marginXS,
color: colorText,
fontSize: fontSize,
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'start'
}, _defineProperty(_$concat, "> ".concat(iconCls), {
color: colorWarning,
fontSize: fontSize,
flex: 'none',
lineHeight: 1,
paddingTop: (Math.round(fontSize * lineHeight) - fontSize) / 2
}), _defineProperty(_$concat, '&-title', {
flex: 'auto',
marginInlineStart: marginXS
}), _$concat)), _defineProperty(_componentCls, "".concat(componentCls, "-buttons"), {
textAlign: 'end',
button: {
marginInlineStart: marginXS
}
}), _componentCls));
}; // ============================== Export ==============================
export default genComponentStyleHook('Popconfirm', function (token) {
return genBaseStyle(token);
}, function (token) {
var zIndexPopupBase = token.zIndexPopupBase;
return {
zIndexPopup: zIndexPopupBase + 60
};
});