ant-design-vue/components/_util/hooks/useConfigInject.ts
tangjinzhou b0025d9e79
feat: add typography (#3807)
* feat: add typography

* fix: review typography

* fix: review typography

* feat: update typography

* feat: update typography

* fix: typography

* test: update typography

Co-authored-by: zkwolf <chenhao5866@gmail.com>
2021-03-16 12:54:22 +08:00

9 lines
369 B
TypeScript

import { computed, inject } from 'vue';
import { defaultConfigProvider } from '../../config-provider';
export default (name: string, props: Record<any, any>) => {
const configProvider = inject('configProvider', defaultConfigProvider);
const prefixCls = computed(() => configProvider.getPrefixCls(name, props.prefixCls));
return { configProvider, prefixCls };
};