Skip to content

Commit

Permalink
[@mantine/core] Notification: Make onClose handler optional
Browse files Browse the repository at this point in the history
  • Loading branch information
rtivital committed Mar 24, 2022
1 parent 2dbc1a6 commit a49cf93
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Expand Up @@ -6,7 +6,6 @@ import { Notification, NotificationProps } from './Notification';
const defaultProps: NotificationProps = {
icon: 'test-icon',
title: 'test-notification',
onClose: () => {},
closeButtonProps: { title: 'test-close' },
};

Expand Down
Expand Up @@ -18,7 +18,7 @@ export interface NotificationProps
extends DefaultProps<NotificationStylesNames>,
Omit<React.ComponentPropsWithoutRef<'div'>, 'title'> {
/** Called when close button is clicked */
onClose(): void;
onClose?(): void;

/** Notification line or icon color */
color?: MantineColor;
Expand Down

0 comments on commit a49cf93

Please sign in to comment.