mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-12 20:43:11 +08:00
Format
This commit is contained in:
parent
c095c3d370
commit
048f5f339f
@ -20,6 +20,7 @@ export interface ConfigProps {
|
|||||||
placement?: NotificationPlacement;
|
placement?: NotificationPlacement;
|
||||||
getContainer?: () => HTMLElement;
|
getContainer?: () => HTMLElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setNotificationConfig(options: ConfigProps) {
|
function setNotificationConfig(options: ConfigProps) {
|
||||||
const { duration, placement, bottom, top, getContainer } = options;
|
const { duration, placement, bottom, top, getContainer } = options;
|
||||||
if (duration !== undefined) {
|
if (duration !== undefined) {
|
||||||
@ -121,6 +122,7 @@ export interface ArgsProps {
|
|||||||
readonly type?: IconType;
|
readonly type?: IconType;
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
function notice(args: ArgsProps) {
|
function notice(args: ArgsProps) {
|
||||||
const outerPrefixCls = args.prefixCls || 'ant-notification';
|
const outerPrefixCls = args.prefixCls || 'ant-notification';
|
||||||
const prefixCls = `${outerPrefixCls}-notice`;
|
const prefixCls = `${outerPrefixCls}-notice`;
|
||||||
@ -206,4 +208,5 @@ export interface NotificationApi {
|
|||||||
config(options: ConfigProps): void;
|
config(options: ConfigProps): void;
|
||||||
destroy(): void;
|
destroy(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default api as NotificationApi;
|
export default api as NotificationApi;
|
||||||
|
Loading…
Reference in New Issue
Block a user