1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.prepareComponentToken = exports.default = void 0;
- var _internal = require("../../theme/internal");
- // =============================== Base ===============================
- const genBaseStyle = token => {
- const {
- componentCls,
- iconCls,
- antCls,
- zIndexPopup,
- colorText,
- colorWarning,
- marginXXS,
- marginXS,
- fontSize,
- fontWeightStrong,
- colorTextHeading
- } = token;
- return {
- [componentCls]: {
- zIndex: zIndexPopup,
- [`&${antCls}-popover`]: {
- fontSize
- },
- [`${componentCls}-message`]: {
- marginBottom: marginXS,
- display: 'flex',
- flexWrap: 'nowrap',
- alignItems: 'start',
- [`> ${componentCls}-message-icon ${iconCls}`]: {
- color: colorWarning,
- fontSize,
- lineHeight: 1,
- marginInlineEnd: marginXS
- },
- [`${componentCls}-title`]: {
- fontWeight: fontWeightStrong,
- color: colorTextHeading,
- '&:only-child': {
- fontWeight: 'normal'
- }
- },
- [`${componentCls}-description`]: {
- marginTop: marginXXS,
- color: colorText
- }
- },
- [`${componentCls}-buttons`]: {
- textAlign: 'end',
- whiteSpace: 'nowrap',
- button: {
- marginInlineStart: marginXS
- }
- }
- }
- };
- };
- // ============================== Export ==============================
- const prepareComponentToken = token => {
- const {
- zIndexPopupBase
- } = token;
- return {
- zIndexPopup: zIndexPopupBase + 60
- };
- };
- exports.prepareComponentToken = prepareComponentToken;
- var _default = exports.default = (0, _internal.genStyleHooks)('Popconfirm', token => genBaseStyle(token), prepareComponentToken, {
- resetStyle: false
- });
|