UNPKG

1.5 kBTypeScriptView Raw
1import type { GlobalToken, MappingAlgorithm } from './interface';
2import defaultAlgorithm from './themes/default';
3/** Get current context Design Token. Will be different if you are using nest theme config. */
4declare function useToken(): {
5 theme: import("@ant-design/cssinjs").Theme<import("./interface").SeedToken, import("./interface").AliasToken>;
6 token: GlobalToken;
7 hashId: string;
8};
9export type { GlobalToken, MappingAlgorithm };
10declare const _default: {
11 /** Default seedToken */
12 defaultSeed: import("./interface").SeedToken;
13 useToken: typeof useToken;
14 defaultAlgorithm: typeof defaultAlgorithm;
15 darkAlgorithm: import("@ant-design/cssinjs").DerivativeFunc<import("./interface").SeedToken, import("./interface").MapToken>;
16 compactAlgorithm: import("@ant-design/cssinjs").DerivativeFunc<import("./interface").SeedToken, import("./interface").MapToken>;
17 getDesignToken: (config?: import("..").ThemeConfig) => import("./interface").AliasToken;
18 /**
19 * @private Private variable
20 * @warring 🔥 Do not use in production. 🔥
21 */
22 defaultConfig: {
23 token: import("./interface").SeedToken;
24 override: {
25 override: import("./interface").SeedToken;
26 };
27 hashed: boolean;
28 };
29 /**
30 * @private Private variable
31 * @warring 🔥 Do not use in production. 🔥
32 */
33 _internalContext: import("react").Context<import("./context").DesignTokenProviderProps>;
34};
35export default _default;