2022-04-22 15:00:18 +08:00
|
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
|
|
|
import type { LayoutToken } from '.';
|
2022-11-23 20:22:38 +08:00
|
|
|
import type { GenerateStyle } from '../../theme/internal';
|
2022-04-22 15:00:18 +08:00
|
|
|
|
2022-11-19 13:47:33 +08:00
|
|
|
const genLayoutLightStyle: GenerateStyle<LayoutToken, CSSObject> = (token) => {
|
2023-08-11 19:37:44 +08:00
|
|
|
const { componentCls, bodyBg, lightSiderBg, lightTriggerBg, lightTriggerColor } = token;
|
2022-04-22 15:00:18 +08:00
|
|
|
|
|
|
|
return {
|
2022-05-19 16:23:12 +08:00
|
|
|
[`${componentCls}-sider-light`]: {
|
2023-08-11 19:37:44 +08:00
|
|
|
background: lightSiderBg,
|
2022-05-19 16:23:12 +08:00
|
|
|
|
2022-04-22 15:00:18 +08:00
|
|
|
[`${componentCls}-sider-trigger`]: {
|
2023-08-11 19:37:44 +08:00
|
|
|
color: lightTriggerColor,
|
|
|
|
background: lightTriggerBg,
|
2022-04-22 15:00:18 +08:00
|
|
|
},
|
2022-05-19 16:23:12 +08:00
|
|
|
|
2022-04-22 15:00:18 +08:00
|
|
|
[`${componentCls}-sider-zero-width-trigger`]: {
|
2023-08-11 19:37:44 +08:00
|
|
|
color: lightTriggerColor,
|
|
|
|
background: lightTriggerBg,
|
|
|
|
border: `1px solid ${bodyBg}`, // Safe to modify to any other color
|
2022-05-19 16:23:12 +08:00
|
|
|
borderInlineStart: 0,
|
2022-04-22 15:00:18 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default genLayoutLightStyle;
|