| 1 |
import { __rest } from "tslib"; |
| 2 |
import { jsx as _jsx } from "react/jsx-runtime"; |
| 3 |
import { css } from '@patternfly/react-styles'; |
| 4 |
import styles from '@patternfly/react-styles/css/components/Alert/alert.mjs'; |
| 5 |
import RhUiCheckCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-check-circle-fill-icon'; |
| 6 |
import RhUiErrorFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-error-fill-icon'; |
| 7 |
import RhUiWarningFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-warning-fill-icon'; |
| 8 |
import RhUiInformationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-information-fill-icon'; |
| 9 |
import RhUiNotificationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-notification-fill-icon'; |
| 10 |
export const variantIcons = { |
| 11 |
success: RhUiCheckCircleFillIcon, |
| 12 |
danger: RhUiErrorFillIcon, |
| 13 |
warning: RhUiWarningFillIcon, |
| 14 |
info: RhUiInformationFillIcon, |
| 15 |
custom: RhUiNotificationFillIcon |
| 16 |
}; |
| 17 |
export const AlertIcon = (_a) => { |
| 18 |
var { variant, customIcon, className = '' } = _a, props = __rest(_a, ["variant", "customIcon", "className"]); |
| 19 |
const Icon = variantIcons[variant]; |
| 20 |
return Icon ? (_jsx("div", Object.assign({}, props, { className: css(styles.alertIcon, className), children: customIcon || _jsx(Icon, {}) }))) : null; |
| 21 |
}; |
| 22 |
//# sourceMappingURL=AlertIcon.js.map |