@openshift-assisted/ui-lib
Version:
React component library for the Assisted Installer UI
14 lines • 1.05 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const react_core_1 = require("@patternfly/react-core");
const defaultTitle = 'Unable to fetch the latest data';
const defaultContent = "There was an error fetching the latest data from the API. We'll try again, but if the data does not update in a few minutes, try refreshing the page.";
const ClusterPollingErrorModal = ({ title = defaultTitle, content = defaultContent, }) => {
return (react_1.default.createElement(react_core_1.Modal, { title: title, isOpen: true, variant: react_core_1.ModalVariant.small, showClose: false, titleIconVariant: "danger", actions: [
react_1.default.createElement(react_core_1.Button, { key: "refresh", variant: react_core_1.ButtonVariant.primary, onClick: () => window.location.reload() }, "Refresh page"),
] }, content));
};
exports.default = ClusterPollingErrorModal;
//# sourceMappingURL=ClusterPollingErrorModal.js.map
;