mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-15 13:38:29 +02:00

Some checks failed
✅ test / test-react-legacy (push) Failing after 53s
✅ test / test-node (push) Failing after 55s
✅ test / test-react-latest-dist (push) Has been skipped
✅ test / test lib/es module (push) Failing after 55s
👁️ Visual Regression Persist Start / test image (push) Failing after 56s
Publish Any Commit / build (push) Failing after 55s
🔀 Sync mirror to Gitee / mirror (push) Has been skipped
✅ test / lint (push) Failing after 55s
✅ test / test-react-latest (push) Failing after 58s
✅ test / test-coverage (push) Has been skipped
✅ test / build (push) Failing after 55s
* chore: fix biome error * fix * fix again * revert
54 lines
1.7 KiB
TypeScript
54 lines
1.7 KiB
TypeScript
import { unit } from '@ant-design/cssinjs';
|
|
import type { CSSObject } from '@ant-design/cssinjs';
|
|
|
|
import {
|
|
genBorderlessStyle,
|
|
genFilledStyle,
|
|
genOutlinedStyle,
|
|
genUnderlinedStyle,
|
|
} from '../../input/style/variants';
|
|
import type { PickerToken } from './token';
|
|
|
|
const genVariantsStyle = (token: PickerToken): CSSObject => {
|
|
const { componentCls } = token;
|
|
|
|
return {
|
|
[componentCls]: [
|
|
{
|
|
...genOutlinedStyle(token),
|
|
...genUnderlinedStyle(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}`,
|
|
},
|
|
},
|
|
'&-underlined': {
|
|
[`&${componentCls}-multiple ${componentCls}-selection-item`]: {
|
|
background: token.multipleItemBg,
|
|
border: `${unit(token.lineWidth)} ${token.lineType} ${token.multipleItemBorderColor}`,
|
|
},
|
|
},
|
|
},
|
|
],
|
|
};
|
|
};
|
|
|
|
export default genVariantsStyle;
|