-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ConfigProvider): add icons config
- Loading branch information
Showing
46 changed files
with
535 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,36 @@ | ||
# ConfigProvider | ||
|
||
Configure locale messages and custom icons globally. | ||
|
||
## When to use | ||
|
||
- You want to use other languages than English | ||
- You want to use your own icon set instead of `antd-mobile-icons` | ||
|
||
## Demos | ||
|
||
<code src="./demos/demo1.tsx" ></code> | ||
|
||
<code src="./demos/demo2.tsx" ></code> | ||
|
||
## ConfigProvider | ||
|
||
### Props | ||
|
||
| Name | Description | Type | Default | | ||
| --- | --- | --- | --- | | ||
| locale | Locale messages | `Locale` | [zh-CN] | | ||
| checkList | CheckList config | `{ activeIcon?: ReactNode }` | - | | ||
| collapse | Collapse config | `{ arrowIcon?: ReactNode \| ((active: boolean) => ReactNode) }` | - | | ||
| dropdown | Dropdown config | `{ arrowIcon?: ReactNode }` | - | | ||
| form | Form config | `{ helpIcon?: ReactNode }` | - | | ||
| input | Input config | `{ clearIcon?: ReactNode }` | - | | ||
| list | List config | `{ arrowIcon?: ReactNode }` | - | | ||
| navBar | NavBar config | `{ backIcon?: ReactNode }` | - | | ||
| noticeBar | NoticeBar config | `{ icon?: ReactNode, closeIcon?: ReactNode }` | - | | ||
| popup | Popup config | `{ closeIcon?: ReactNode }` | - | | ||
| result | Result config | `{ successIcon?: ReactNode, errorIcon?: ReactNode, infoIcon?: ReactNode, waitingIcon?: ReactNode, warningIcon?: ReactNode }` | - | | ||
| searchBar | SearchBar config | `{ icon?: ReactNode }` | - | | ||
| toast | Toast config | `{ successIcon?: ReactNode, failIcon?: ReactNode, loadingIcon?: ReactNode }` | - | | ||
|
||
[zh-CN]: https://github.com/ant-design/ant-design-mobile/blob/master/src/locales/zh-CN.ts |
Oops, something went wrong.