Files
backstage/.changeset/chilled-ladybugs-cough.md
T
Patrik Oldsberg 7d11560c44 Update .changeset/chilled-ladybugs-cough.md
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2022-12-06 13:38:35 +01:00

511 B

@backstage/core-plugin-api
@backstage/core-plugin-api
minor

Added a new display property to the AlertMessage which can accept the values permanent or transient.

Here's a rough example of how to trigger an alert using the new display property:

import { alertApiRef, useApi } from '@backstage/core-plugin-api';

const ExampleTransient = () => {
  const alertApi = useApi(alertApiRef);
  alertApi.post({
    message: 'Example of Transient Alert',
    severity: 'success',
    display: 'transient',
  });
};