mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-30 12:28:33 +08:00
e2d7e689e5
* docs: image component adding destroyOnClose * docs: update demo
24 lines
535 B
TypeScript
24 lines
535 B
TypeScript
import React from 'react';
|
|
import { Image } from 'antd';
|
|
|
|
const App: React.FC = () => (
|
|
<Image
|
|
width={200}
|
|
preview={{
|
|
destroyOnClose: true,
|
|
imageRender: () => (
|
|
<video
|
|
muted
|
|
width="100%"
|
|
controls
|
|
src="https://mdn.alipayobjects.com/huamei_iwk9zp/afts/file/A*uYT7SZwhJnUAAAAAAAAAAAAADgCCAQ"
|
|
/>
|
|
),
|
|
toolbarRender: () => null,
|
|
}}
|
|
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
|
|
/>
|
|
);
|
|
|
|
export default App;
|