Commit f2b99a12 authored by Juan Rodrigo Venegas Boesch's avatar Juan Rodrigo Venegas Boesch Committed by 陈帅

NoticeIcon new feature

parent ad38d93f
......@@ -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;
......
......@@ -12,6 +12,7 @@ order: 9
Property | Description | Type | Default
----|------|-----|------
count | Total number of messages | number | -
bell | Change the bell Icon | ReactNode | `<Icon type='bell' />`
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) | -
......
......@@ -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 || <Icon type="bell" className={styles.icon} />;
const trigger = (
<span className={noticeButtonClass}>
<Badge count={count} style={{ boxShadow: 'none' }} className={styles.badge}>
<Icon type="bell" className={styles.icon} />
{NoticeBellIcon}
</Badge>
</span>
);
......
......@@ -12,6 +12,7 @@ order: 9
参数 | 说明 | 类型 | 默认值
----|------|-----|------
count | 图标上的消息总数 | number | -
bell | translate this please -> Change the bell Icon | ReactNode | `<Icon type='bell' />`
loading | 弹出卡片加载状态 | boolean | false
onClear | 点击清空按钮的回调 | function(tabTitle) | -
onItemClick | 点击列表项的回调 | function(item, tabProps) | -
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment