mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 09:21:22 +08:00
22 lines
437 B
TypeScript
22 lines
437 B
TypeScript
|
import React, { useState } from 'react';
|
||
|
import { Alert } from 'antd';
|
||
|
|
||
|
const App: React.FC = () => {
|
||
|
const [visible, setVisible] = useState(true);
|
||
|
|
||
|
const handleClose = () => {
|
||
|
setVisible(false);
|
||
|
};
|
||
|
|
||
|
return (
|
||
|
<div>
|
||
|
{visible ? (
|
||
|
<Alert message="Alert Message Text" type="success" closable afterClose={handleClose} />
|
||
|
) : null}
|
||
|
<p>placeholder text here</p>
|
||
|
</div>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default App;
|