custom-icon.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _cssinjs = require("@ant-design/cssinjs");
  7. const genStepsCustomIconStyle = token => {
  8. const {
  9. componentCls,
  10. customIconTop,
  11. customIconSize,
  12. customIconFontSize
  13. } = token;
  14. return {
  15. [`${componentCls}-item-custom`]: {
  16. [`> ${componentCls}-item-container > ${componentCls}-item-icon`]: {
  17. height: 'auto',
  18. background: 'none',
  19. border: 0,
  20. [`> ${componentCls}-icon`]: {
  21. top: customIconTop,
  22. width: customIconSize,
  23. height: customIconSize,
  24. fontSize: customIconFontSize,
  25. lineHeight: (0, _cssinjs.unit)(customIconSize)
  26. }
  27. }
  28. },
  29. // Only adjust horizontal customize icon width
  30. [`&:not(${componentCls}-vertical)`]: {
  31. [`${componentCls}-item-custom`]: {
  32. [`${componentCls}-item-icon`]: {
  33. width: 'auto',
  34. background: 'none'
  35. }
  36. }
  37. }
  38. };
  39. };
  40. var _default = exports.default = genStepsCustomIconStyle;