@openshift-assisted/ui-lib
Version:
React component library for the Assisted Installer UI
21 lines • 1.9 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const common_1 = require("../../../common");
const ClusterWizardContext_1 = require("./ClusterWizardContext");
const ClusterWizardFooter_1 = tslib_1.__importDefault(require("./ClusterWizardFooter"));
const ClusterWizardNavigation_1 = tslib_1.__importDefault(require("./ClusterWizardNavigation"));
const WithErrorBoundary_1 = require("../../../common/components/ErrorHandling/WithErrorBoundary");
const react_core_1 = require("@patternfly/react-core");
const KubeconfigDownload = ({ cluster }) => {
const [isChecked, setIsChecked] = react_1.default.useState(false);
const clusterWizardContext = (0, ClusterWizardContext_1.useClusterWizardContext)();
const footer = (react_1.default.createElement(ClusterWizardFooter_1.default, { cluster: cluster, onNext: () => clusterWizardContext.moveNext(), onBack: () => clusterWizardContext.moveBack(), isNextDisabled: !isChecked, nextButtonText: "Download Kubeconfig" }));
return (react_1.default.createElement(common_1.ClusterWizardStep, { navigation: react_1.default.createElement(ClusterWizardNavigation_1.default, { cluster: cluster }), footer: footer },
react_1.default.createElement(WithErrorBoundary_1.WithErrorBoundary, { title: "Failed to load Kubeconfig Download step" },
react_1.default.createElement(common_1.ClusterWizardStepHeader, null, "Download Kubeconfig"),
react_1.default.createElement(react_core_1.Checkbox, { id: "Kubeconfig-download-agreement", isChecked: isChecked, onChange: () => setIsChecked(!isChecked), label: "I understand that I need to download Kubeconfig file prior of proceeding with the cluster installation." }))));
};
exports.default = KubeconfigDownload;
//# sourceMappingURL=KubeconfigDownload.js.map