Skip to content

Commit b4decb3

Browse files
feat: Update props and test case
1 parent 0a0aada commit b4decb3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Notice.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ const Notify = React.forwardRef<HTMLDivElement, NoticeProps & { times?: number }
141141
{closable && (
142142
<button
143143
className={clsx(`${noticePrefixCls}-close`, classNames?.close)}
144-
style={{ ...styles?.close }}
144+
style={styles?.close}
145145
onKeyDown={onCloseKeyDown}
146146
aria-label="Close"
147147
{...ariaProps}

tests/index.test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,9 @@ describe('Notification.Basic', () => {
644644
});
645645
expect(document.querySelector('.rc-notification-notice-wrapper')).toHaveClass('bamboo');
646646

647-
expect(document.querySelector('.rc-notification-notice-close')).toHaveClass('custom-close');
648-
expect(document.querySelector('.rc-notification-notice-close')).toHaveStyle({
647+
const closeButton = document.querySelector('.rc-notification-notice-close');
648+
expect(closeButton).toHaveClass('custom-close');
649+
expect(closeButton).toHaveStyle({
649650
color: 'rgb(255, 0, 0)',
650651
});
651652
});

0 commit comments

Comments
 (0)