| Server IP : 13.235.167.51 / Your IP : 216.73.217.116 Web Server : Apache System : Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64 User : root ( 0) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/control.machinox.in/node_modules/react-bootstrap/esm/ |
Upload File : |
"use client";
import classNames from 'classnames';
import * as React from 'react';
import { useUncontrolled } from 'uncontrollable';
import useEventCallback from '@restart/hooks/useEventCallback';
import { useBootstrapPrefix } from './ThemeProvider';
import AlertHeading from './AlertHeading';
import AlertLink from './AlertLink';
import Fade from './Fade';
import CloseButton from './CloseButton';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
const Alert = /*#__PURE__*/React.forwardRef((uncontrolledProps, ref) => {
const {
bsPrefix,
show = true,
closeLabel = 'Close alert',
closeVariant,
className,
children,
variant = 'primary',
onClose,
dismissible,
transition = Fade,
...props
} = useUncontrolled(uncontrolledProps, {
show: 'onClose'
});
const prefix = useBootstrapPrefix(bsPrefix, 'alert');
const handleClose = useEventCallback(e => {
if (onClose) {
onClose(false, e);
}
});
const Transition = transition === true ? Fade : transition;
const alert = /*#__PURE__*/_jsxs("div", {
role: "alert",
...(!Transition ? props : undefined),
ref: ref,
className: classNames(className, prefix, variant && `${prefix}-${variant}`, dismissible && `${prefix}-dismissible`),
children: [dismissible && /*#__PURE__*/_jsx(CloseButton, {
onClick: handleClose,
"aria-label": closeLabel,
variant: closeVariant
}), children]
});
if (!Transition) return show ? alert : null;
return /*#__PURE__*/_jsx(Transition, {
unmountOnExit: true,
...props,
ref: undefined,
in: show,
children: alert
});
});
Alert.displayName = 'Alert';
export default Object.assign(Alert, {
Link: AlertLink,
Heading: AlertHeading
});