mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 01:19:45 +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
629 B
TypeScript
18 lines
629 B
TypeScript
import type { SeedToken, SizeMapToken } from '../../interface';
|
|
|
|
export default function genSizeMapToken(token: SeedToken): SizeMapToken {
|
|
const { sizeUnit, sizeBaseStep } = token;
|
|
|
|
return {
|
|
sizeXXL: sizeUnit * (sizeBaseStep + 8), // 48
|
|
sizeXL: sizeUnit * (sizeBaseStep + 4), // 32
|
|
sizeLG: sizeUnit * (sizeBaseStep + 2), // 24
|
|
sizeMD: sizeUnit * (sizeBaseStep + 1), // 20
|
|
sizeMS: sizeUnit * sizeBaseStep, // 16
|
|
size: sizeUnit * sizeBaseStep, // 16
|
|
sizeSM: sizeUnit * (sizeBaseStep - 1), // 12
|
|
sizeXS: sizeUnit * (sizeBaseStep - 2), // 8
|
|
sizeXXS: sizeUnit * (sizeBaseStep - 3), // 4
|
|
};
|
|
}
|