mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 01:11:26 +08:00
27 lines
651 B
TypeScript
27 lines
651 B
TypeScript
|
import React from 'react';
|
||
|
import { Alert } from 'antd';
|
||
|
|
||
|
const onClose = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
|
||
|
console.log(e, 'I was closed.');
|
||
|
};
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<>
|
||
|
<Alert
|
||
|
message="Warning Text Warning Text Warning TextW arning Text Warning Text Warning TextWarning Text"
|
||
|
type="warning"
|
||
|
closable
|
||
|
onClose={onClose}
|
||
|
/>
|
||
|
<Alert
|
||
|
message="Error Text"
|
||
|
description="Error Description Error Description Error Description Error Description Error Description Error Description"
|
||
|
type="error"
|
||
|
closable
|
||
|
onClose={onClose}
|
||
|
/>
|
||
|
</>
|
||
|
);
|
||
|
|
||
|
export default App;
|