mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 17:19:11 +08:00
827ada2da6
* refactor: refactor closeIcon * feat: update test case * feat: optimize code * feat: remove demo about closeText * feat: remove demo about closeText * feat: optimize code * feat: optimize code * feat: optimize code * feat: optimize code * feat: optimize code * feat: optimize code * feat: optimize code * feat: optimize code
27 lines
717 B
TypeScript
27 lines
717 B
TypeScript
import { Alert, Space } from 'antd';
|
|
import React from 'react';
|
|
|
|
const onClose = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
|
|
console.log(e, 'I was closed.');
|
|
};
|
|
|
|
const App: React.FC = () => (
|
|
<Space direction="vertical" style={{ width: '100%' }}>
|
|
<Alert
|
|
message="Warning Text Warning Text Warning TextW arning Text Warning Text Warning TextWarning Text"
|
|
type="warning"
|
|
closeIcon
|
|
onClose={onClose}
|
|
/>
|
|
<Alert
|
|
message="Error Text"
|
|
description="Error Description Error Description Error Description Error Description Error Description Error Description"
|
|
type="error"
|
|
closeIcon
|
|
onClose={onClose}
|
|
/>
|
|
</Space>
|
|
);
|
|
|
|
export default App;
|