mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-02 15:59:38 +08:00
29 lines
621 B
TypeScript
29 lines
621 B
TypeScript
|
import React, { useState } from 'react';
|
||
|
import { Button, Modal } from 'antd';
|
||
|
|
||
|
const App: React.FC = () => {
|
||
|
const [open, setOpen] = useState(false);
|
||
|
|
||
|
return (
|
||
|
<>
|
||
|
<Button type="primary" onClick={() => setOpen(true)}>
|
||
|
Open Modal of 1000px width
|
||
|
</Button>
|
||
|
<Modal
|
||
|
title="Modal 1000px width"
|
||
|
centered
|
||
|
open={open}
|
||
|
onOk={() => setOpen(false)}
|
||
|
onCancel={() => setOpen(false)}
|
||
|
width={1000}
|
||
|
>
|
||
|
<p>some contents...</p>
|
||
|
<p>some contents...</p>
|
||
|
<p>some contents...</p>
|
||
|
</Modal>
|
||
|
</>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default App;
|