horizontal.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. const getHorizontalStyle = token => {
  7. const {
  8. componentCls,
  9. motionDurationSlow,
  10. menuHorizontalHeight,
  11. colorSplit,
  12. lineWidth,
  13. lineType,
  14. menuItemPaddingInline
  15. } = token;
  16. return {
  17. [`${componentCls}-horizontal`]: {
  18. lineHeight: `${menuHorizontalHeight}px`,
  19. border: 0,
  20. borderBottom: `${lineWidth}px ${lineType} ${colorSplit}`,
  21. boxShadow: 'none',
  22. '&::after': {
  23. display: 'block',
  24. clear: 'both',
  25. height: 0,
  26. content: '"\\20"'
  27. },
  28. // ======================= Item =======================
  29. [`${componentCls}-item, ${componentCls}-submenu`]: {
  30. position: 'relative',
  31. display: 'inline-block',
  32. verticalAlign: 'bottom',
  33. paddingInline: menuItemPaddingInline
  34. },
  35. [`> ${componentCls}-item:hover,
  36. > ${componentCls}-item-active,
  37. > ${componentCls}-submenu ${componentCls}-submenu-title:hover`]: {
  38. backgroundColor: 'transparent'
  39. },
  40. [`${componentCls}-item, ${componentCls}-submenu-title`]: {
  41. transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`].join(',')
  42. },
  43. // ===================== Sub Menu =====================
  44. [`${componentCls}-submenu-arrow`]: {
  45. display: 'none'
  46. }
  47. }
  48. };
  49. };
  50. var _default = exports.default = getHorizontalStyle;