Skip to content

Commit f573342

Browse files
antd: Fix notification typings.
These are exported as 'notification' rather than 'Notification' so we need to use the correct case when providing the typings.
1 parent cc3d223 commit f573342

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

antd/antd-tests.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import React = __React
2323
Menu,
2424
message,
2525
Modal,
26-
Notification,
26+
notification,
2727
Pagination,
2828
Popconfirm,
2929
Popover,
@@ -71,7 +71,7 @@ import Col from 'antd/lib/Col'
7171
import Menu from 'antd/lib/Menu'
7272
import message from 'antd/lib/message'
7373
import Modal from 'antd/lib/Modal'
74-
import Notification from 'antd/lib/Notification'
74+
import notification from 'antd/lib/notification'
7575
import Pagination from 'antd/lib/Pagination'
7676
import Popconfirm from 'antd/lib/Popconfirm'
7777
import Popover from 'antd/lib/Popover'
@@ -229,7 +229,7 @@ class App extends React.Component<any, any>{
229229

230230
Modal.info({ title: 'hello' });
231231
Modal.success({ cancelText: 'No' })
232-
Notification.success({
232+
notification.success({
233233
message: 'hello',
234234
description: 'test'
235235
})

antd/antd.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ declare namespace Antd {
871871
duration?: number
872872
}) => void
873873
/**
874-
* #Notification
874+
* #notification
875875
全局展示通知提醒信息。
876876
877877
## 何时使用
@@ -881,7 +881,7 @@ declare namespace Antd {
881881
- 较为复杂的通知内容。
882882
- 带有交互的通知,给出用户下一步的行动点。
883883
- 系统主动推送。*/
884-
export const Notification: {
884+
export const notification: {
885885
success: NotificationFunc
886886
error: NotificationFunc
887887
info: NotificationFunc
@@ -1911,8 +1911,8 @@ declare module 'antd/lib/message' {
19111911
declare module 'antd/lib/Modal' {
19121912
export default Antd.Modal
19131913
}
1914-
declare module 'antd/lib/Notification' {
1915-
export default Antd.Notification
1914+
declare module 'antd/lib/notification' {
1915+
export default Antd.notification
19161916
}
19171917
declare module 'antd/lib/Pagination' {
19181918
export default Antd.Pagination

0 commit comments

Comments
 (0)