index.d.ts 1.23 KB
Newer Older
jim's avatar
jim committed
1
import * as React from 'react';
2
export interface NoticeIconData {
jim's avatar
jim committed
3 4 5 6 7 8
  avatar?: string;
  title?: React.ReactNode;
  description?: React.ReactNode;
  datetime?: React.ReactNode;
  extra?: React.ReactNode;
  style?: React.CSSProperties;
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
}

export interface NoticeIconProps {
  count?: number;
  className?: string;
  loading?: boolean;
  onClear?: (tableTile: string) => void;
  onItemClick?: (item: NoticeIconData, tabProps: NoticeIconProps) => void;
  onTabChange?: (tableTile: string) => void;
  popupAlign?: {
    points?: [string, string];
    offset?: [number, number];
    targetOffset?: [number, number];
    overflow?: any;
    useCssRight?: boolean;
    useCssBottom?: boolean;
    useCssTransform?: boolean;
  };
jim's avatar
jim committed
27
  style?: React.CSSProperties;
28 29 30 31 32 33
  onPopupVisibleChange?: (visible: boolean) => void;
  popupVisible?: boolean;
  locale?: { emptyText: string; clear: string };
}

export interface NoticeIconTabProps {
jim's avatar
jim committed
34 35
  list?: Array<NoticeIconData>;
  title?: string;
36 37
  emptyText?: React.ReactNode;
  emptyImage?: string;
jim's avatar
jim committed
38
  style?: React.CSSProperties;
39 40 41 42 43 44 45
}

export class NoticeIconTab extends React.Component<NoticeIconTabProps, any> {}

export default class NoticeIcon extends React.Component<NoticeIconProps, any> {
  static Tab: typeof NoticeIconTab;
}