From 350f039c0bc4a327bda9f79b44eb33716180a04e Mon Sep 17 00:00:00 2001 From: Ruben Carvalho Date: Thu, 26 Jan 2023 13:41:50 +0000 Subject: [PATCH 1/2] fix: Remove wrong deprecated tag on flashbar interfaces --- src/__tests__/__snapshots__/documenter.test.ts.snap | 1 - src/flashbar/interfaces.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/__tests__/__snapshots__/documenter.test.ts.snap b/src/__tests__/__snapshots__/documenter.test.ts.snap index 30113f24fa..cf947ddb31 100644 --- a/src/__tests__/__snapshots__/documenter.test.ts.snap +++ b/src/__tests__/__snapshots__/documenter.test.ts.snap @@ -5545,7 +5545,6 @@ Object { "type": "string", }, Object { - "deprecatedTag": "Replaced by \`action\`.", "description": "Specifies flash messages that appear in the same order that they are listed. The value is an array of flash message definition objects. A flash message object contains the following properties: diff --git a/src/flashbar/interfaces.ts b/src/flashbar/interfaces.ts index bed01e70b1..3a29a7b8b8 100644 --- a/src/flashbar/interfaces.ts +++ b/src/flashbar/interfaces.ts @@ -52,7 +52,6 @@ export interface FlashbarProps extends BaseComponentProps { * 1. As a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering. * 2. To identify which flash message will be removed from the DOM when it is dismissed, to animate it out. * - * @deprecated Replaced by `action`. * @visualrefresh `id` property */ items: ReadonlyArray; From 0238f7cc52e4ca86f7f3a5b9a6e158cea52ebcd6 Mon Sep 17 00:00:00 2001 From: Ruben Carvalho Date: Thu, 26 Jan 2023 13:53:25 +0000 Subject: [PATCH 2/2] chore: Update deprecation notice for buttonText --- src/__tests__/__snapshots__/documenter.test.ts.snap | 3 ++- src/flashbar/interfaces.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/__tests__/__snapshots__/documenter.test.ts.snap b/src/__tests__/__snapshots__/documenter.test.ts.snap index cf947ddb31..3a7edf6eff 100644 --- a/src/__tests__/__snapshots__/documenter.test.ts.snap +++ b/src/__tests__/__snapshots__/documenter.test.ts.snap @@ -5562,7 +5562,8 @@ user's attention. * \`action\` (ReactNode) - Specifies an action for the flash message. Although it is technically possible to insert any content, our UX guidelines only allow you to add a button. * \`buttonText\` (string) - Specifies that an action button should be displayed, with the specified text. -When a user clicks on this button the \`onButtonClick\` handler is called. If the \`action\` property is set, this property is ignored. +When a user clicks on this button the \`onButtonClick\` handler is called. +If the \`action\` property is set, this property is ignored. **Deprecated**, replaced by \`action\`. * \`onButtonClick\` (event => void) - Called when a user clicks on the action button. This is not called if you create a custom button using the \`action\` property. **Deprecated**, replaced by \`action\`. * \`id\` (string) - Specifies a unique flash message identifier. This property is used in two ways: diff --git a/src/flashbar/interfaces.ts b/src/flashbar/interfaces.ts index 3a29a7b8b8..6e3db925e3 100644 --- a/src/flashbar/interfaces.ts +++ b/src/flashbar/interfaces.ts @@ -45,7 +45,8 @@ export interface FlashbarProps extends BaseComponentProps { * * `action` (ReactNode) - Specifies an action for the flash message. Although it is technically possible to insert any content, * our UX guidelines only allow you to add a button. * * `buttonText` (string) - Specifies that an action button should be displayed, with the specified text. - * When a user clicks on this button the `onButtonClick` handler is called. If the `action` property is set, this property is ignored. + * When a user clicks on this button the `onButtonClick` handler is called. + * If the `action` property is set, this property is ignored. **Deprecated**, replaced by `action`. * * `onButtonClick` (event => void) - Called when a user clicks on the action button. This is not called if you create a custom button * using the `action` property. **Deprecated**, replaced by `action`. * * `id` (string) - Specifies a unique flash message identifier. This property is used in two ways: