Skip to content

feat: export configContentInject and formatToken #8197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/config-provider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ const ConfigProvider = defineComponent({
});

ConfigProvider.config = setGlobalConfig;
ConfigProvider.useConfigContextInject = useConfigContextInject;

ConfigProvider.install = function (app: App) {
app.component(ConfigProvider.name, ConfigProvider);
Expand All @@ -298,4 +299,5 @@ ConfigProvider.install = function (app: App) {
export default ConfigProvider as typeof ConfigProvider &
Plugin & {
readonly config: typeof setGlobalConfig;
readonly useConfigContextInject: typeof useConfigContextInject;
};
2 changes: 2 additions & 0 deletions components/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { GlobalToken } from './interface';
import defaultAlgorithm from './themes/default';
import darkAlgorithm from './themes/dark';
import compactAlgorithm from './themes/compact';
import formatToken from './util/alias';

// 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.
Expand All @@ -25,6 +26,7 @@ export default {
defaultSeed: defaultConfig.token,

useToken,
formatToken,
defaultAlgorithm,
darkAlgorithm,
compactAlgorithm,
Expand Down
Loading