type.d.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. export interface TdMessageProps {
  2. align?: {
  3. type: StringConstructor;
  4. value?: MessageAlignType;
  5. };
  6. closeBtn?: {
  7. type: null;
  8. value?: string | boolean | object;
  9. };
  10. content?: {
  11. type: StringConstructor;
  12. value?: string;
  13. };
  14. duration?: {
  15. type: NumberConstructor;
  16. value?: number;
  17. };
  18. gap?: {
  19. type: null;
  20. value?: string | number | boolean;
  21. };
  22. icon?: {
  23. type: null;
  24. value?: string | boolean | object;
  25. };
  26. link?: {
  27. type: null;
  28. value?: string | object;
  29. };
  30. marquee?: {
  31. type: null;
  32. value?: boolean | MessageMarquee;
  33. };
  34. offset?: {
  35. type: ArrayConstructor;
  36. value?: Array<string | number>;
  37. };
  38. single?: {
  39. type: BooleanConstructor;
  40. value?: boolean;
  41. };
  42. theme?: {
  43. type: StringConstructor;
  44. value?: MessageThemeList;
  45. };
  46. visible?: {
  47. type: BooleanConstructor;
  48. value?: boolean;
  49. };
  50. defaultVisible?: {
  51. type: BooleanConstructor;
  52. value?: boolean;
  53. };
  54. zIndex?: {
  55. type: NumberConstructor;
  56. value?: number;
  57. };
  58. }
  59. export declare type MessageAlignType = 'left' | 'center';
  60. export interface MessageMarquee {
  61. speed?: number;
  62. loop?: number;
  63. delay?: number;
  64. }
  65. export declare type MessageThemeList = 'info' | 'success' | 'warning' | 'error';