index.d.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import * as React from 'react';
  2. export interface NoticeIconData {
  3. avatar?: string;
  4. title?: React.ReactNode;
  5. description?: React.ReactNode;
  6. datetime?: React.ReactNode;
  7. extra?: React.ReactNode;
  8. style?: React.CSSProperties;
  9. }
  10. export interface NoticeIconProps {
  11. count?: number;
  12. className?: string;
  13. loading?: boolean;
  14. onClear?: (tableTile: string) => void;
  15. onItemClick?: (item: NoticeIconData, tabProps: NoticeIconProps) => void;
  16. onTabChange?: (tableTile: string) => void;
  17. popupAlign?: {
  18. points?: [string, string];
  19. offset?: [number, number];
  20. targetOffset?: [number, number];
  21. overflow?: any;
  22. useCssRight?: boolean;
  23. useCssBottom?: boolean;
  24. useCssTransform?: boolean;
  25. };
  26. onPopupVisibleChange?: (visible: boolean) => void;
  27. popupVisible?: boolean;
  28. locale?: { emptyText: string; clear: string };
  29. }
  30. export interface NoticeIconTabProps {
  31. list?: Array<NoticeIconData>;
  32. title?: string;
  33. emptyText?: React.ReactNode;
  34. emptyImage?: string;
  35. }
  36. export class NoticeIconTab extends React.Component<NoticeIconTabProps, any> {}
  37. export default class NoticeIcon extends React.Component<NoticeIconProps, any> {
  38. static Tab: typeof NoticeIconTab;
  39. }