diff --git a/src/Notice.tsx b/src/Notice.tsx index 243e778..f032747 100644 --- a/src/Notice.tsx +++ b/src/Notice.tsx @@ -33,6 +33,8 @@ const Notify = React.forwardRef { act(() => { instance.open({ + closable: true, styles: { wrapper: { content: 'little', }, + close: { + color: 'red', + }, }, classNames: { wrapper: 'bamboo', + close: 'custom-close', }, }); }); @@ -638,6 +643,12 @@ describe('Notification.Basic', () => { content: 'little', }); expect(document.querySelector('.rc-notification-notice-wrapper')).toHaveClass('bamboo'); + + const closeButton = document.querySelector('.rc-notification-notice-close'); + expect(closeButton).toHaveClass('custom-close'); + expect(closeButton).toHaveStyle({ + color: 'rgb(255, 0, 0)', + }); }); it('should className work', () => {