This commit is contained in:
ztplz 2019-01-05 21:33:07 +08:00 committed by 偏右
parent c095c3d370
commit 048f5f339f

View File

@ -20,6 +20,7 @@ export interface ConfigProps {
placement?: NotificationPlacement;
getContainer?: () => HTMLElement;
}
function setNotificationConfig(options: ConfigProps) {
const { duration, placement, bottom, top, getContainer } = options;
if (duration !== undefined) {
@ -121,6 +122,7 @@ export interface ArgsProps {
readonly type?: IconType;
onClick?: () => void;
}
function notice(args: ArgsProps) {
const outerPrefixCls = args.prefixCls || 'ant-notification';
const prefixCls = `${outerPrefixCls}-notice`;
@ -206,4 +208,5 @@ export interface NotificationApi {
config(options: ConfigProps): void;
destroy(): void;
}
export default api as NotificationApi;