diff --git a/src/components/NoticeIcon/index.d.ts b/src/components/NoticeIcon/index.d.ts index 52c4dea3a1abe1b822de55b7388087573ba05edd..25d426230a53bf7b34fc0497456a8d7a491317f1 100644 --- a/src/components/NoticeIcon/index.d.ts +++ b/src/components/NoticeIcon/index.d.ts @@ -3,6 +3,7 @@ import NoticeIconTab, { INoticeIconData } from './NoticeIconTab'; export interface INoticeIconProps { count?: number; + bell?: React.ReactNode; className?: string; loading?: boolean; onClear?: (tableTile: string) => void; diff --git a/src/components/NoticeIcon/index.en-US.md b/src/components/NoticeIcon/index.en-US.md index 3ee5677b46f57be4289b2bcaaaf49cfedcbe24bf..95c3f7b483b4d3d57ffb11206fc0011c6fba35e6 100644 --- a/src/components/NoticeIcon/index.en-US.md +++ b/src/components/NoticeIcon/index.en-US.md @@ -12,6 +12,7 @@ order: 9 Property | Description | Type | Default ----|------|-----|------ count | Total number of messages | number | - +bell | Change the bell Icon | ReactNode | `` loading | Popup card loading status | boolean | false onClear | Click to clear button the callback | function(tabTitle) | - onItemClick | Click on the list item's callback | function(item, tabProps) | - diff --git a/src/components/NoticeIcon/index.js b/src/components/NoticeIcon/index.js index 120daedf1ec5804c7ccada9ed3c891ff727cbca2..6d3017f33cd7b124e6faaa5ea9f8de76bb8ae01f 100644 --- a/src/components/NoticeIcon/index.js +++ b/src/components/NoticeIcon/index.js @@ -65,13 +65,14 @@ export default class NoticeIcon extends PureComponent { } render() { - const { className, count, popupAlign, popupVisible, onPopupVisibleChange } = this.props; + const { className, count, popupAlign, popupVisible, onPopupVisibleChange, bell } = this.props; const noticeButtonClass = classNames(className, styles.noticeButton); const notificationBox = this.getNotificationBox(); + const NoticeBellIcon = bell || ; const trigger = ( - + {NoticeBellIcon} ); diff --git a/src/components/NoticeIcon/index.zh-CN.md b/src/components/NoticeIcon/index.zh-CN.md index b5aa3c8fae39b7f38d55d1be2da2bf816579975c..e5d96c85f42586d6fc8035a6407fe4813ed20121 100644 --- a/src/components/NoticeIcon/index.zh-CN.md +++ b/src/components/NoticeIcon/index.zh-CN.md @@ -12,6 +12,7 @@ order: 9 参数 | 说明 | 类型 | 默认值 ----|------|-----|------ count | 图标上的消息总数 | number | - +bell | translate this please -> Change the bell Icon | ReactNode | `` loading | 弹出卡片加载状态 | boolean | false onClear | 点击清空按钮的回调 | function(tabTitle) | - onItemClick | 点击列表项的回调 | function(item, tabProps) | -