ConfigProvider
Provide a uniform configuration support for components.
When to use
Provide a uniform configuration support for components.
Examples
API
ConfigProvider, ConfigProvider.config, and ConfigProvider.useConfig are exported from @ceebee/ui/client.
ConfigProvider
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
componentDisabled | Config antd component disabled | boolean | - | 4.21.0 |
componentSize | Config antd component size | small | medium | large | - | — |
csp | Set Content Security Policy config | { nonce: string } | - | — |
direction | Set direction of layout. See demo | ltr | rtl | ltr | — |
getPopupContainer | To set the container of the popup element. The default is to create a div element in body | (trigger?: HTMLElement) => HTMLElement | ShadowRoot | () => document.body | — |
getTargetContainer | Config Affix, Anchor scroll target container | () => HTMLElement | Window | ShadowRoot | () => window | 4.2.0 |
iconPrefixCls | Set icon prefix className | string | anticon | 4.11.0 |
locale | Language package setting, you can find the packages in antd/locale | object | - | — |
popupMatchSelectWidth | Determine whether the dropdown menu and the select input are the same width. Default set min-width same as input. Will ignore when value less than select width. false will disable virtual scroll | boolean | number | - | 5.5.0 |
popupOverflow | Select like component popup logic. Can set to show in viewport or follow window scroll | 'viewport' | 'scroll' <InlinePopover previewURL="https://user-images.githubusercontent.com/5378891/230344474-5b9f7e09-0a5d-49e8-bae8-7d2abed6c837.png"></InlinePopover> | 'viewport' | 5.5.0 |
prefixCls | Set prefix className | string | ant | — |
renderEmpty | Set empty content of components. Ref Empty | function(componentName: string): ReactNode | - | — |
theme | Set theme, ref Customize Theme | Theme | - | 5.0.0 |
variant | Set variant of data entry components | outlined | filled | borderless | - | 5.19.0 |
virtual | Disable virtual scroll when set to false | boolean | - | 4.3.0 |
warning | Config warning level, when strict is false, it will aggregate deprecated information into a single message | { strict: boolean } | - | 5.10.0 |
autoInsertSpaceInButton | Button auto spacing config, please use button={{ autoInsertSpace: boolean }} instead | boolean | - | - |
dropdownMatchSelectWidth | Determine whether the dropdown menu and the select input are the same width, please use popupMatchSelectWidth instead | boolean | - | - |
ConfigProvider.useConfig() <Badge>5.3.0+</Badge> {#useconfig}
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
componentDisabled | antd component disabled state | boolean | - | 5.3.0 |
componentSize | antd component size state | small | medium | large | - | 5.3.0 |
WaveConfig
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
disabled | Whether to disable wave effect | boolean | false | — |
showEffect | Customized wave effect | (node: HTMLElement, info: { className, token, component }) => void | - | — |
triggerType | The event that triggers wave effect | click | pointerdown | pointerup | mousedown | mouseup | click | 6.4.0 |