mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-25 08:43:57 +08:00
502dac12aa
* docs: fix code * feat: lint * feat: prettier * feat: test * feat: review * feat: format html * feat: format html
43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
import { unit } from '@ant-design/cssinjs';
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
|
|
|
import { genBorderlessStyle, genFilledStyle, genOutlinedStyle } from '../../input/style/variants';
|
|
import type { PickerToken } from './token';
|
|
|
|
const genVariantsStyle = (token: PickerToken): CSSObject => {
|
|
const { componentCls } = token;
|
|
|
|
return {
|
|
[componentCls]: [
|
|
{
|
|
...genOutlinedStyle(token),
|
|
...genFilledStyle(token),
|
|
...genBorderlessStyle(token),
|
|
},
|
|
// ========================= Multiple =========================
|
|
{
|
|
'&-outlined': {
|
|
[`&${componentCls}-multiple ${componentCls}-selection-item`]: {
|
|
background: token.multipleItemBg,
|
|
border: `${unit(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`,
|
|
},
|
|
},
|
|
'&-filled': {
|
|
[`&${componentCls}-multiple ${componentCls}-selection-item`]: {
|
|
background: token.colorBgContainer,
|
|
border: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,
|
|
},
|
|
},
|
|
'&-borderless': {
|
|
[`&${componentCls}-multiple ${componentCls}-selection-item`]: {
|
|
background: token.multipleItemBg,
|
|
border: `${unit(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`,
|
|
},
|
|
},
|
|
},
|
|
],
|
|
};
|
|
};
|
|
|
|
export default genVariantsStyle;
|