@ant-design/x
Version:
Craft AI-driven interfaces effortlessly
48 lines (47 loc) • 1.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.genSlotStyle = void 0;
const genSlotStyle = token => {
const {
componentCls,
fontSize,
lineHeight,
paddingXXS,
margin,
colorText,
fontSizeLG,
calc
} = token;
return {
[componentCls]: {
// ======================== Header & Footer ========================
[`${componentCls}-header`]: {
display: 'flex',
marginBottom: paddingXXS,
fontSize: fontSize,
lineHeight: lineHeight,
color: colorText
},
[`${componentCls}-footer`]: {
display: 'flex',
marginBlockStart: margin,
fontSize: fontSize,
lineHeight: lineHeight,
color: colorText,
'&-start': {
flexDirection: 'row'
},
'&-end': {
flexDirection: 'row-reverse'
}
},
// ======================== Sider ========================
[`${componentCls}-avatar`]: {
minWidth: calc(fontSizeLG).mul(2).equal()
}
}
};
};
exports.genSlotStyle = genSlotStyle;