ant-design/components/image/demo/imageRender.tsx
Wanpan e2d7e689e5
docs: image component adding destroyOnClose (#48827)
* docs: image component adding destroyOnClose

* docs: update demo
2024-05-08 19:05:50 +08:00

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;