Skip to content

Commit

Permalink
fix(Notification): allow undefined props in TypeScript (#15068)
Browse files Browse the repository at this point in the history
Co-authored-by: Taylor Jones <[email protected]>
  • Loading branch information
lewandom and tay1orjones authored Oct 31, 2023
1 parent 5da61b5 commit b4a5d05
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/react/src/components/Notification/Notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ export interface ToastNotificationProps extends HTMLAttributes<HTMLDivElement> {
/**
* Specify what state the notification represents
*/
kind:
kind?:
| 'error'
| 'info'
| 'info-square'
Expand All @@ -357,13 +357,13 @@ export interface ToastNotificationProps extends HTMLAttributes<HTMLDivElement> {
/**
* Provide a function that is called when the close button is clicked
*/
onCloseButtonClick(event: MouseEvent): void;
onCloseButtonClick?(event: MouseEvent): void;

/**
* By default, this value is "status". You can also provide an alternate
* role if it makes sense from the accessibility-side
*/
role: 'alert' | 'log' | 'status';
role?: 'alert' | 'log' | 'status';

/**
* Provide a description for "status" icon that can be read by screen readers
Expand Down Expand Up @@ -612,7 +612,7 @@ export interface InlineNotificationProps
/**
* Specify what state the notification represents
*/
kind:
kind?:
| 'error'
| 'info'
| 'info-square'
Expand All @@ -633,13 +633,13 @@ export interface InlineNotificationProps
/**
* Provide a function that is called when the close button is clicked
*/
onCloseButtonClick(event: MouseEvent): void;
onCloseButtonClick?(event: MouseEvent): void;

/**
* By default, this value is "status". You can also provide an alternate
* role if it makes sense from the accessibility-side.
*/
role: 'alert' | 'log' | 'status';
role?: 'alert' | 'log' | 'status';

/**
* Provide a description for "status" icon that can be read by screen readers
Expand Down Expand Up @@ -859,7 +859,7 @@ export interface ActionableNotificationProps
/**
* Specify what state the notification represents
*/
kind:
kind?:
| 'error'
| 'info'
| 'info-square'
Expand All @@ -886,7 +886,7 @@ export interface ActionableNotificationProps
/**
* Provide a function that is called when the close button is clicked
*/
onCloseButtonClick(event: MouseEvent): void;
onCloseButtonClick?(event: MouseEvent): void;

/**
* By default, this value is "alertdialog". You can also provide an alternate
Expand Down

0 comments on commit b4a5d05

Please sign in to comment.