mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
type: Add placement to NotificationConfig (#40908)
* Add placement to NotificationConfig * Update useNotification.tsx --------- Co-authored-by: Martijn Dormans <martijn.dormans@whyellow.nl> Co-authored-by: Wuxh <wxh16144@qq.com>
This commit is contained in:
parent
14dd2cdcdb
commit
947f86f178
@ -60,6 +60,7 @@ export interface NotificationConfig {
|
||||
bottom?: number;
|
||||
prefixCls?: string;
|
||||
getContainer?: () => HTMLElement;
|
||||
placement?: NotificationPlacement;
|
||||
maxCount?: number;
|
||||
rtl?: boolean;
|
||||
}
|
||||
|
@ -110,13 +110,13 @@ export function useInternalNotification(
|
||||
description,
|
||||
icon,
|
||||
type,
|
||||
placement = 'topRight',
|
||||
btn,
|
||||
className,
|
||||
...restConfig
|
||||
} = config;
|
||||
|
||||
return originOpen({
|
||||
placement: 'topRight',
|
||||
...restConfig,
|
||||
content: (
|
||||
<PureContent
|
||||
@ -128,7 +128,6 @@ export function useInternalNotification(
|
||||
btn={btn}
|
||||
/>
|
||||
),
|
||||
placement,
|
||||
className: classNames(type && `${noticePrefixCls}-${type}`, hashId, className),
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user