index.d.ts 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import type { CSSObject } from '@ant-design/cssinjs';
  2. import type { AliasToken, FullToken, GenStyleFn } from '../../theme/internal';
  3. /** Component only token. Which will handle additional calculation of alias token */
  4. export interface ComponentToken {
  5. /**
  6. * @desc 提醒框 z-index
  7. * @descEN z-index of Notification
  8. */
  9. zIndexPopup: number;
  10. /**
  11. * @desc 提醒框宽度
  12. * @descEN Width of Notification
  13. */
  14. width: number | string;
  15. }
  16. /**
  17. * @desc Notification 组件的 Token
  18. * @descEN Token for Notification component
  19. */
  20. export interface NotificationToken extends FullToken<'Notification'> {
  21. /**
  22. * @desc 动画最大高度
  23. * @descEN Maximum height of animation
  24. */
  25. animationMaxHeight: number | string;
  26. /**
  27. * @desc 提醒框背景色
  28. * @descEN Background color of Notification
  29. */
  30. notificationBg: string;
  31. /**
  32. * @desc 提醒框内边距
  33. * @descEN Padding of Notification
  34. */
  35. notificationPadding: string;
  36. /**
  37. * @desc 提醒框垂直内边距
  38. * @descEN Vertical padding of Notification
  39. */
  40. notificationPaddingVertical: number;
  41. /**
  42. * @desc 提醒框水平内边距
  43. * @descEN Horizontal padding of Notification
  44. */
  45. notificationPaddingHorizontal: number;
  46. /**
  47. * @desc 提醒框图标尺寸
  48. * @descEN Icon size of Notification
  49. */
  50. notificationIconSize: number | string;
  51. /**
  52. * @desc 提醒框关闭按钮尺寸
  53. * @descEN Close button size of Notification
  54. */
  55. notificationCloseButtonSize: number | string;
  56. /**
  57. * @desc 提醒框底部外边距
  58. * @descEN Bottom margin of Notification
  59. */
  60. notificationMarginBottom: number;
  61. /**
  62. * @desc 提醒框边缘外边距
  63. * @descEN Edge margin of Notification
  64. */
  65. notificationMarginEdge: number;
  66. /**
  67. * @desc 提醒框堆叠层数
  68. * @descEN Stack layer of Notification
  69. */
  70. notificationStackLayer: number;
  71. /**
  72. * @desc 提醒框进度条背景色
  73. * @descEN Background color of Notification progress bar
  74. */
  75. notificationProgressBg: string;
  76. /**
  77. * @desc 提醒框进度条高度
  78. * @descEN Height of Notification progress bar
  79. */
  80. notificationProgressHeight: number;
  81. }
  82. export declare const genNoticeStyle: (token: NotificationToken) => CSSObject;
  83. export declare const prepareComponentToken: (token: AliasToken) => {
  84. zIndexPopup: number;
  85. width: number;
  86. };
  87. export declare const prepareNotificationToken: (token: Parameters<GenStyleFn<'Notification'>>[0]) => NotificationToken;
  88. declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
  89. export default _default;