fleet/frontend/interfaces/notification.ts
Martavis Parker 3575d34507
Refactor Redux-triggered flash message component (#4795)
* base logic to handle rendering a notification without redux

* removed dispatches for new flash mesage triggers

* query page wrapper is no longer needed

* refactored confirm invite page to remove redux

* refactored email token redirect to functional and typescript

* refactored pack composer page to functional and typescript

* clean up

* lint fixes

* tests no longer needed

* fixed confirm sso invite test

* test fix

* fixed test

* fixed tests

* removed redux from flash on rebased pages
2022-03-31 23:42:26 -07:00

16 lines
378 B
TypeScript

import PropTypes from "prop-types";
export default PropTypes.shape({
alertType: PropTypes.string,
isVisible: PropTypes.bool,
message: PropTypes.string,
undoAction: PropTypes.func,
});
export interface INotification {
alertType: "success" | "error" | "warning-filled" | null;
isVisible: boolean;
message: JSX.Element | string | null;
undoAction?: () => void;
}