element-plus/packages/components/config-provider/config-provider.ts
jeremywu 19bc41f965
feat(hooks): extracting size injection for form items (#3383)
* feat(hooks): extracting size injection for form items

- Extract common code for form items
- Apply extracted code for el-button

* - Address import order

* Update packages/hooks/use-form-item/index.ts

Co-authored-by: 三咲智子 <sxzz@sxzz.moe>

* - Fix type annotation for fallbacks

* - Use MaybeRef to mark type of local fallbacks

Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
2021-09-13 23:14:48 +08:00

18 lines
328 B
TypeScript

import { defineComponent } from 'vue'
import { useLocaleProps, useLocale } from '@element-plus/hooks'
export const ConfigProvider = defineComponent({
name: 'ElConfigProvider',
props: {
...useLocaleProps,
// Add more configs
},
setup(_, { slots }) {
useLocale()
return () => slots.default?.()
},
})