custom-icon.js 929 B

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