antd
Version:
An enterprise-class UI design language and React components implementation
40 lines (37 loc) • 1.79 kB
JavaScript
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
var getHorizontalStyle = function getHorizontalStyle(token) {
var _$concat;
var componentCls = token.componentCls,
motionDurationSlow = token.motionDurationSlow,
menuHorizontalHeight = token.menuHorizontalHeight,
colorSplit = token.colorSplit,
lineWidth = token.lineWidth,
lineType = token.lineType,
menuItemPaddingInline = token.menuItemPaddingInline,
menuItemMarginInline = token.menuItemMarginInline;
return _defineProperty({}, "".concat(componentCls, "-horizontal"), (_$concat = {
lineHeight: "".concat(menuHorizontalHeight, "px"),
border: 0,
borderBottom: "".concat(lineWidth, "px ").concat(lineType, " ").concat(colorSplit),
boxShadow: 'none',
'&::after': {
display: 'block',
clear: 'both',
height: 0,
content: '"\\20"'
}
}, _defineProperty(_$concat, "".concat(componentCls, "-item, ").concat(componentCls, "-submenu"), {
position: 'relative',
display: 'inline-block',
verticalAlign: 'bottom',
paddingInline: menuItemPaddingInline,
marginInline: menuItemMarginInline
}), _defineProperty(_$concat, "> ".concat(componentCls, "-item:hover,\n > ").concat(componentCls, "-item-active,\n > ").concat(componentCls, "-submenu ").concat(componentCls, "-submenu-title:hover"), {
backgroundColor: 'transparent'
}), _defineProperty(_$concat, "".concat(componentCls, "-item, ").concat(componentCls, "-submenu-title"), {
transition: ["border-color ".concat(motionDurationSlow), "background ".concat(motionDurationSlow)].join(',')
}), _defineProperty(_$concat, "".concat(componentCls, "-submenu-arrow"), {
display: 'none'
}), _$concat));
};
export default getHorizontalStyle;