UNPKG

mod-arch-shared

Version:

Shared UI components and utilities for modular architecture micro-frontend projects

16 lines 1.4 kB
import * as React from 'react'; import { ActionList, ActionListItem, ActionListGroup, Alert, Button, Stack, StackItem, } from '@patternfly/react-core'; const DashboardModalFooter = ({ submitLabel, submitButtonVariant = 'primary', onSubmit, onCancel, isSubmitDisabled, isSubmitLoading, isCancelDisabled, error, alertTitle, }) => ( // make sure alert uses the full width React.createElement(Stack, { hasGutter: true, style: { flex: 'auto' } }, error && (React.createElement(StackItem, null, React.createElement(Alert, { "data-testid": "error-message-alert", isInline: true, variant: "danger", title: alertTitle }, error.message))), React.createElement(StackItem, null, React.createElement(ActionList, null, React.createElement(ActionListGroup, null, React.createElement(ActionListItem, null, React.createElement(Button, { key: "submit", variant: submitButtonVariant, isDisabled: isSubmitDisabled, onClick: onSubmit, isLoading: isSubmitLoading, "data-testid": "modal-submit-button" }, submitLabel)), React.createElement(ActionListItem, null, React.createElement(Button, { key: "cancel", variant: "link", isDisabled: isCancelDisabled, onClick: onCancel, "data-testid": "modal-cancel-button" }, "Cancel"))))))); export default DashboardModalFooter; //# sourceMappingURL=DashboardModalFooter.js.map