Added transient AlertMessage

Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>
This commit is contained in:
Andre Wanlin
2022-09-02 12:18:35 -05:00
parent dd916a0cf5
commit 1ae86ab5fb
6 changed files with 49 additions and 12 deletions
+20
View File
@@ -0,0 +1,20 @@
---
'@backstage/core-components': patch
'@backstage/core-plugin-api': patch
---
Added option to allow the `AlertMessage` to be self-closing. This is done with a new `transient` boolean that is set on the `AlertMessage`. The length of time that these transient message stay open for can be set using the `transientTimeoutMs` prop on the `AlertDisplay` in the `App.tsx`. Here is an example:
```diff
const App = () => (
<AppProvider>
+ <AlertDisplay transientTimeoutMs={2500} />
<OAuthRequestDialog />
<AppRouter>
<Root>{routes}</Root>
</AppRouter>
</AppProvider>
);
```
The above example will set the transient timeout to 2500ms from the default of 5000ms