@keycloakify/keycloak-account-ui
Version:
Repackaged Keycloak Account UI
6 lines • 771 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { AlertGroup, Alert, AlertActionCloseButton, AlertVariant, } from "@patternfly/react-core";
export function AlertPanel({ alerts, onCloseAlert }) {
return (_jsx(AlertGroup, { "data-testid": "global-alerts", isToast: true, style: { whiteSpace: "pre-wrap" }, children: alerts.map(({ id, variant, message, description }, index) => (_jsx(Alert, { "data-testid": index === 0 ? "last-alert" : undefined, isLiveRegion: true, variant: AlertVariant[variant], component: "p", variantLabel: "", title: message, actionClose: _jsx(AlertActionCloseButton, { title: message, onClose: () => onCloseAlert(id) }), children: description && _jsx("p", { children: description }) }, id))) }));
}
//# sourceMappingURL=AlertPanel.js.map