mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-04 17:09:46 +08:00
ffc09a2a0d
* feat: compact theme * chore: code clean * chore: code clean * chore: show dynamic theme in preview * chore: code clean * feat: compact algorithm
18 lines
578 B
TypeScript
18 lines
578 B
TypeScript
import type { SeedToken, SizeMapToken } from '../../interface';
|
|
|
|
export default function genSizeMapToken(token: SeedToken): SizeMapToken {
|
|
const { sizeUnit, sizeBaseStep } = token;
|
|
|
|
return {
|
|
sizeXXL: sizeUnit * (sizeBaseStep + 10),
|
|
sizeXL: sizeUnit * (sizeBaseStep + 6),
|
|
sizeLG: sizeUnit * (sizeBaseStep + 2),
|
|
sizeMD: sizeUnit * (sizeBaseStep + 2),
|
|
sizeMS: sizeUnit * (sizeBaseStep + 1),
|
|
size: sizeUnit * sizeBaseStep,
|
|
sizeSM: sizeUnit * sizeBaseStep,
|
|
sizeXS: sizeUnit * (sizeBaseStep - 1),
|
|
sizeXXS: sizeUnit * (sizeBaseStep - 1),
|
|
};
|
|
}
|