label-placement.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. const genStepsLabelPlacementStyle = token => {
  7. const {
  8. componentCls,
  9. stepsIconSize,
  10. lineHeight,
  11. stepsSmallIconSize
  12. } = token;
  13. return {
  14. [`&${componentCls}-label-vertical`]: {
  15. [`${componentCls}-item`]: {
  16. overflow: 'visible',
  17. '&-tail': {
  18. marginInlineStart: stepsIconSize / 2 + token.controlHeightLG,
  19. padding: `${token.paddingXXS}px ${token.paddingLG}px`
  20. },
  21. '&-content': {
  22. display: 'block',
  23. width: (stepsIconSize / 2 + token.controlHeightLG) * 2,
  24. marginTop: token.marginSM,
  25. textAlign: 'center'
  26. },
  27. '&-icon': {
  28. display: 'inline-block',
  29. marginInlineStart: token.controlHeightLG
  30. },
  31. '&-title': {
  32. paddingInlineEnd: 0,
  33. paddingInlineStart: 0,
  34. '&::after': {
  35. display: 'none'
  36. }
  37. },
  38. '&-subtitle': {
  39. display: 'block',
  40. marginBottom: token.marginXXS,
  41. marginInlineStart: 0,
  42. lineHeight
  43. }
  44. },
  45. [`&${componentCls}-small:not(${componentCls}-dot)`]: {
  46. [`${componentCls}-item`]: {
  47. '&-icon': {
  48. marginInlineStart: token.controlHeightLG + (stepsIconSize - stepsSmallIconSize) / 2
  49. }
  50. }
  51. }
  52. }
  53. };
  54. };
  55. var _default = exports.default = genStepsLabelPlacementStyle;