mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
16 lines
476 B
TypeScript
16 lines
476 B
TypeScript
|
import type { DerivativeFunc } from '@ant-design/cssinjs';
|
||
|
import type { SeedToken, MapToken } from '../../interface';
|
||
|
import defaultAlgorithm from '../default';
|
||
|
import genCompactSizeMapToken from './genCompactSizeMapToken';
|
||
|
|
||
|
const derivative: DerivativeFunc<SeedToken, MapToken> = (token, mapToken) => {
|
||
|
const mergedMapToken = mapToken ?? defaultAlgorithm(token);
|
||
|
|
||
|
return {
|
||
|
...mergedMapToken,
|
||
|
...genCompactSizeMapToken(token),
|
||
|
};
|
||
|
};
|
||
|
|
||
|
export default derivative;
|