diff --git a/src/mantine-core/src/components/Notification/Notification.test.tsx b/src/mantine-core/src/components/Notification/Notification.test.tsx index 82f658be48b..86a33905869 100644 --- a/src/mantine-core/src/components/Notification/Notification.test.tsx +++ b/src/mantine-core/src/components/Notification/Notification.test.tsx @@ -6,7 +6,6 @@ import { Notification, NotificationProps } from './Notification'; const defaultProps: NotificationProps = { icon: 'test-icon', title: 'test-notification', - onClose: () => {}, closeButtonProps: { title: 'test-close' }, }; diff --git a/src/mantine-core/src/components/Notification/Notification.tsx b/src/mantine-core/src/components/Notification/Notification.tsx index b0bd360411d..57cda38b1da 100644 --- a/src/mantine-core/src/components/Notification/Notification.tsx +++ b/src/mantine-core/src/components/Notification/Notification.tsx @@ -18,7 +18,7 @@ export interface NotificationProps extends DefaultProps, Omit, 'title'> { /** Called when close button is clicked */ - onClose(): void; + onClose?(): void; /** Notification line or icon color */ color?: MantineColor;