element-plus/packages/hooks/use-global-config/index.ts

14 lines
353 B
TypeScript
Raw Normal View History

import { inject } from 'vue'
import { configProviderContextKey } from '@element-plus/tokens'
import type { ConfigProvdierContext } from '@element-plus/tokens'
const defaultConfig: ConfigProvdierContext = {
button: {
autoInsertSpace: false,
},
}
export const useGlobalConfig = () => {
return inject(configProviderContextKey, defaultConfig)
}