ant-design / ant-design-mobile

Essential UI blocks for building mobile web apps.
https://mobile.ant.design
MIT License
11.5k stars 2.37k forks source link

feat(ConfigProvider): add icons config #6587

Closed guoyunhe closed 3 weeks ago

guoyunhe commented 3 months ago

增加一种通过 <ConfigProvider> 设置全局图标替换的方式:

import { SuccessFill, ErrorFill, Loading } from 'my-icon-pack'

<ConfigProvider icons={{
  ToastSuccess: SuccessFill,
  ToastFail: ErrorFill,
  ToastLoading: Loading,
}}>
  <App/>
</ConfigProvider>
github-actions[bot] commented 3 months ago

PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6587.surge.sh

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.52%. Comparing base (cf550e4) to head (a10882d). Report is 15 commits behind head on master.

:exclamation: Current head a10882d differs from pull request most recent head cefc14a

Please upload reports for the commit cefc14a to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6587 +/- ## ========================================== + Coverage 92.34% 92.52% +0.17% ========================================== Files 318 319 +1 Lines 6910 6969 +59 Branches 1729 1760 +31 ========================================== + Hits 6381 6448 +67 + Misses 493 485 -8 Partials 36 36 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 3 months ago

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
./lib/bundle/antd-mobile.es.js 102.44 KB (+452 B 🔺) 2.1 s (+0.44% 🔺) 846 ms (-1.75% 🔽) 2.9 s
github-actions[bot] commented 3 months ago

Size Change: +1.45 kB (+0.41%)

Total Size: 355 kB

Filename Size Change
./lib/bundle/antd-mobile.compatible.umd.js 191 kB +957 B (+0.5%)
./lib/bundle/antd-mobile.umd.js 145 kB +500 B (+0.35%)
./lib/bundle/style.css 18 kB -3 B (-0.02%)
ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `./lib/bundle/css-vars-patch.css` | 1.42 kB |

compressed-size-action