Skip to content

Commit bd5e0ae

Browse files
committed
refactor: spread notification item pass-through props
1 parent f350bdb commit bd5e0ae

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/NotificationList/index.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,12 @@ const NotificationListItem: React.FC<NotificationListItemProps> = (props) => {
8888
motionClassName,
8989
motionStyle,
9090
nodeRef,
91-
prefixCls,
92-
offset,
93-
notificationIndex,
94-
stackInThreshold,
9591
listHovering,
9692
stackEnabled,
9793
pauseOnHover,
9894
setNodeSize,
9995
onNoticeClose,
96+
...restProps
10097
} = props;
10198
const { key, placement: itemPlacement, ...notificationConfig } = config;
10299
const strKey = String(key);
@@ -112,11 +109,8 @@ const NotificationListItem: React.FC<NotificationListItemProps> = (props) => {
112109
return (
113110
<Notification
114111
{...notificationConfig}
112+
{...restProps}
115113
ref={ref}
116-
prefixCls={prefixCls}
117-
offset={offset}
118-
notificationIndex={notificationIndex}
119-
stackInThreshold={stackInThreshold}
120114
className={clsx(contextClassNames?.notice, config.className)}
121115
style={config.style}
122116
classNames={fillClassNames([

0 commit comments

Comments
 (0)