Skip to content

Commit 6a09160

Browse files
committed
fix: placement cls
1 parent 0568651 commit 6a09160

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/Notifications.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ const Notifications = React.forwardRef<NotificationsRef, NotificationsProps>((pr
132132
return (
133133
<CSSMotionList
134134
key={placement}
135-
className={classNames(prefixCls, `${prefixCls}-topRight`)}
135+
className={classNames(prefixCls, `${prefixCls}-${placement}`)}
136136
style={style?.(placement)}
137137
keys={keys}
138138
motionAppear

tests/index.test.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,4 +492,16 @@ describe('Notification.Basic', () => {
492492
content: 'little',
493493
});
494494
});
495+
496+
it('placement', () => {
497+
const { instance } = renderDemo();
498+
499+
act(() => {
500+
instance.open({
501+
placement: 'bottomLeft',
502+
});
503+
});
504+
505+
expect(document.querySelector('.rc-notification')).toHaveClass('rc-notification-bottomLeft');
506+
});
495507
});

0 commit comments

Comments
 (0)