Browse Source
* feat: migrate less to token for Image * docs: update migrate-less-variables.en-US.md * docs: update migrate-less-variables.zh-CN.md * docs: fix error * docs: fix typo * docs: remove Chinese in English docs * feat: migrate less to token for Image * docs: update migrate-less-variables.en-US.md * docs: remove Chinese in English docs * docs: fix typo * docs: fix docs error * feat: add demo * docs: Update docs/react/migrate-less-variables.zh-CN.md Co-authored-by: MadCcc <1075746765@qq.com> * fix: remove token * docs: Update docs/react/migrate-less-variables.en-US.md * fix: correct token name * fix: demo token name * docs: update global token in docs * docs: update * chore: fix lint --------- Co-authored-by: MadCcc <1075746765@qq.com>pull/42819/head
GUAN MING
2 years ago
committed by
GitHub
9 changed files with 244 additions and 26 deletions
@ -0,0 +1,7 @@ |
|||
## zh-CN |
|||
|
|||
自定义组件 Token。 |
|||
|
|||
## en-US |
|||
|
|||
Custom component token. |
@ -0,0 +1,31 @@ |
|||
import { ConfigProvider, Image } from 'antd'; |
|||
import React from 'react'; |
|||
|
|||
const App: React.FC = () => ( |
|||
<ConfigProvider |
|||
theme={{ |
|||
components: { |
|||
Image: { |
|||
previewOperationSize: 20, |
|||
previewOperationColor: '#222', |
|||
previewOperationColorDisabled: '#b20000', |
|||
}, |
|||
}, |
|||
}} |
|||
> |
|||
<Image.PreviewGroup |
|||
preview={{ countRender: (current, total) => `当前 ${current} / 总计 ${total}` }} |
|||
> |
|||
<Image |
|||
width={150} |
|||
src="https://gw.alipayobjects.com/zos/antfincdn/aPkFc8Sj7n/method-draw-image.svg" |
|||
/> |
|||
<Image |
|||
width={150} |
|||
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" |
|||
/> |
|||
</Image.PreviewGroup> |
|||
</ConfigProvider> |
|||
); |
|||
|
|||
export default App; |
Loading…
Reference in new issue