mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-09 13:28:20 +08:00
9f88c1238a
* feat: token update * chore: update test * chore: lint * chore: code clean * test: update test case * feat: radius token update * fix: form size * chore: fix steps style * chore: code clean * chore: update test case
26 lines
877 B
TypeScript
26 lines
877 B
TypeScript
/* eslint-disable import/prefer-default-export */
|
|
import { defaultConfig, useToken as useInternalToken } from '.';
|
|
import defaultAlgorithm from './themes/default';
|
|
import darkAlgorithm from './themes/dark';
|
|
import compactAlgorithm from './themes/compact';
|
|
|
|
// ZombieJ: We export as object to user but array in internal.
|
|
// This is used to minimize the bundle size for antd package but safe to refactor as object also.
|
|
// Please do not export internal `useToken` directly to avoid something export unexpected.
|
|
/** Get current context Design Token. Will be different if you using nest theme config. */
|
|
function useToken() {
|
|
const [theme, token, hashId] = useInternalToken();
|
|
|
|
return { theme, token, hashId };
|
|
}
|
|
|
|
export default {
|
|
/** @private Test Usage. Do not use in production. */
|
|
defaultConfig,
|
|
|
|
useToken,
|
|
defaultAlgorithm,
|
|
darkAlgorithm,
|
|
compactAlgorithm,
|
|
};
|