index.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _internal = require("../../theme/internal");
  7. // =============================== Base ===============================
  8. const genBaseStyle = token => {
  9. const {
  10. componentCls,
  11. iconCls,
  12. zIndexPopup,
  13. colorText,
  14. colorWarning,
  15. marginXS,
  16. fontSize,
  17. fontWeightStrong,
  18. lineHeight
  19. } = token;
  20. return {
  21. [componentCls]: {
  22. zIndex: zIndexPopup,
  23. [`${componentCls}-inner-content`]: {
  24. color: colorText
  25. },
  26. [`${componentCls}-message`]: {
  27. position: 'relative',
  28. marginBottom: marginXS,
  29. color: colorText,
  30. fontSize,
  31. display: 'flex',
  32. flexWrap: 'nowrap',
  33. alignItems: 'start',
  34. [`> ${componentCls}-message-icon ${iconCls}`]: {
  35. color: colorWarning,
  36. fontSize,
  37. flex: 'none',
  38. lineHeight: 1,
  39. paddingTop: (Math.round(fontSize * lineHeight) - fontSize) / 2
  40. },
  41. '&-title': {
  42. flex: 'auto',
  43. marginInlineStart: marginXS
  44. },
  45. '&-title-only': {
  46. fontWeight: fontWeightStrong
  47. }
  48. },
  49. [`${componentCls}-description`]: {
  50. position: 'relative',
  51. marginInlineStart: fontSize + marginXS,
  52. marginBottom: marginXS,
  53. color: colorText,
  54. fontSize
  55. },
  56. [`${componentCls}-buttons`]: {
  57. textAlign: 'end',
  58. button: {
  59. marginInlineStart: marginXS
  60. }
  61. }
  62. }
  63. };
  64. };
  65. // ============================== Export ==============================
  66. var _default = exports.default = (0, _internal.genComponentStyleHook)('Popconfirm', token => genBaseStyle(token), token => {
  67. const {
  68. zIndexPopupBase
  69. } = token;
  70. return {
  71. zIndexPopup: zIndexPopupBase + 60
  72. };
  73. });