- )
+ );
}
}
-
-export default S;
\ No newline at end of file
+export default S;
diff --git a/src/components/ui/Notifications.jsx b/src/components/ui/Notifications.tsx
similarity index 53%
rename from src/components/ui/Notifications.jsx
rename to src/components/ui/Notifications.tsx
index 6d41c6db7..d77717298 100644
--- a/src/components/ui/Notifications.jsx
+++ b/src/components/ui/Notifications.tsx
@@ -2,29 +2,34 @@
* Created by hao.cheng on 2017/4/25.
*/
import React, { Component } from 'react';
-import { Row, Col, Card, Button, notification, Icon, Select } from 'antd';
-import BreadcrumbCustom from '../BreadcrumbCustom';
+import { Row, Col, Card, Button, notification, Select } from 'antd';
+import BreadcrumbCustom from '../widget/BreadcrumbCustom';
+import { IconType, ConfigProps } from 'antd/lib/notification';
+import { SmileOutlined } from '@ant-design/icons';
const { Option } = Select;
const options = ['topLeft', 'topRight', 'bottomLeft', 'bottomRight'];
class Notifications extends Component {
openNotification = () => {
notification.open({
message: 'Notification Title',
- description: 'This is the content of the notification. This is the content of the notification. This is the content of the notification.'
+ description:
+ 'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
});
};
openNotification2 = () => {
const args = {
message: 'Notification Title',
- description: 'I will never close automatically. I will be close automatically. I will never close automatically.',
+ description:
+ 'I will never close automatically. I will be close automatically. I will never close automatically.',
duration: 0,
};
notification.open(args);
};
- openNotificationWithIcon = (type) => {
+ openNotificationWithIcon = (type: IconType) => {
notification[type]({
message: 'Notification Title',
- description: 'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
+ description:
+ 'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
});
};
openNotification3 = () => {
@@ -40,59 +45,91 @@ class Notifications extends Component {
);
notification.open({
message: 'Notification Title',
- description: 'A function will be be called after the notification is closed (automatically after the "duration" time of manually).',
+ description:
+ 'A function will be be called after the notification is closed (automatically after the "duration" time of manually).',
btn,
key,
onClose: this.close,
});
};
close = () => {
- console.log('Notification was closed. Either the close button was clicked or duration time elapsed.');
+ console.log(
+ 'Notification was closed. Either the close button was clicked or duration time elapsed.'
+ );
};
openNotification4 = () => {
notification.open({
message: 'Notification Title',
- description: 'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
- icon: ,
+ description:
+ 'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
+ icon: ,
});
};
render() {
return (