custom-icon.js 926 B

12345678910111213141516171819202122232425262728293031323334
  1. const genStepsCustomIconStyle = token => {
  2. const {
  3. componentCls,
  4. stepsIconCustomTop,
  5. stepsIconCustomSize,
  6. stepsIconCustomFontSize
  7. } = token;
  8. return {
  9. [`${componentCls}-item-custom`]: {
  10. [`> ${componentCls}-item-container > ${componentCls}-item-icon`]: {
  11. height: 'auto',
  12. background: 'none',
  13. border: 0,
  14. [`> ${componentCls}-icon`]: {
  15. top: stepsIconCustomTop,
  16. width: stepsIconCustomSize,
  17. height: stepsIconCustomSize,
  18. fontSize: stepsIconCustomFontSize,
  19. lineHeight: `${stepsIconCustomSize}px`
  20. }
  21. }
  22. },
  23. // Only adjust horizontal customize icon width
  24. [`&:not(${componentCls}-vertical)`]: {
  25. [`${componentCls}-item-custom`]: {
  26. [`${componentCls}-item-icon`]: {
  27. width: 'auto',
  28. background: 'none'
  29. }
  30. }
  31. }
  32. };
  33. };
  34. export default genStepsCustomIconStyle;