minishouyin/node_modules/antd/es/notification/style/index.d.ts

114 lines
3.4 KiB
TypeScript
Raw Normal View History

2025-11-12 11:35:57 +08:00
import type { CSSObject } from '@ant-design/cssinjs';
import type { AliasToken, FullToken, GenStyleFn } from '../../theme/internal';
/** Component only token. Which will handle additional calculation of alias token */
export interface ComponentToken {
/**
* @desc z-index
* @descEN z-index of Notification
*/
zIndexPopup: number;
/**
* @desc
* @descEN Width of Notification
*/
width: number | string;
/**
* @desc
* @descEN Background color of success notification container
*/
colorSuccessBg?: string;
/**
* @desc
* @descEN Background color of error notification container
*/
colorErrorBg?: string;
/**
* @desc
* @descEN Background color of info notification container
*/
colorInfoBg?: string;
/**
* @desc
* @descEN Background color of warning notification container
*/
colorWarningBg?: string;
}
/**
* @desc Notification Token
* @descEN Token for Notification component
*/
export interface NotificationToken extends FullToken<'Notification'> {
/**
* @desc
* @descEN Maximum height of animation
*/
animationMaxHeight: number | string;
/**
* @desc
* @descEN Background color of Notification
*/
notificationBg: string;
/**
* @desc
* @descEN Padding of Notification
*/
notificationPadding: string;
/**
* @desc
* @descEN Vertical padding of Notification
*/
notificationPaddingVertical: number;
/**
* @desc
* @descEN Horizontal padding of Notification
*/
notificationPaddingHorizontal: number;
/**
* @desc
* @descEN Icon size of Notification
*/
notificationIconSize: number | string;
/**
* @desc
* @descEN Close button size of Notification
*/
notificationCloseButtonSize: number | string;
/**
* @desc
* @descEN Bottom margin of Notification
*/
notificationMarginBottom: number;
/**
* @desc
* @descEN Edge margin of Notification
*/
notificationMarginEdge: number;
/**
* @desc
* @descEN Stack layer of Notification
*/
notificationStackLayer: number;
/**
* @desc
* @descEN Background color of Notification progress bar
*/
notificationProgressBg: string;
/**
* @desc
* @descEN Height of Notification progress bar
*/
notificationProgressHeight: number;
}
export declare const genNoticeStyle: (token: NotificationToken) => CSSObject;
export declare const prepareComponentToken: (token: AliasToken) => {
zIndexPopup: number;
width: number;
colorSuccessBg: string;
colorErrorBg: string;
colorInfoBg: string;
colorWarningBg: string;
};
export declare const prepareNotificationToken: (token: Parameters<GenStyleFn<'Notification'>>[0]) => NotificationToken;
declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
export default _default;