mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 15:19:58 +08:00
fe907cc57b
* refactor: export useDesignToken * chore: site update * chore: not conflict with react version * chore: update snapshot * chore: update snapshot
15 lines
546 B
TypeScript
15 lines
546 B
TypeScript
/* eslint-disable import/prefer-default-export */
|
|
import { useToken } from '.';
|
|
|
|
// 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.
|
|
*/
|
|
export function useDesignToken() {
|
|
const [theme, token, hashId] = useToken();
|
|
|
|
return { theme, token, hashId };
|
|
}
|