mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-24 07:28:28 +08:00
c54b9cd892
* feat: add imgInfo for render function * fix: remove useless code * fix: revert demo * chore: bump rc-image verison from 7.6.0 to 7.7.0 * test: update snapshot * fix: update snapshot * docs: update version * docs: update
20 lines
455 B
TypeScript
20 lines
455 B
TypeScript
import React from 'react';
|
|
import { Image } from 'antd';
|
|
|
|
const src = 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png';
|
|
|
|
const App: React.FC = () => (
|
|
<Image
|
|
src={src}
|
|
width="200px"
|
|
height="200px"
|
|
alt="test"
|
|
preview={{
|
|
imageRender: (_, { image }) => <div>{JSON.stringify(image)}</div>,
|
|
toolbarRender: (_, { image }) => <div>{JSON.stringify(image)}</div>,
|
|
}}
|
|
/>
|
|
);
|
|
|
|
export default App;
|