Debian Codegraph @

node/@patternfly/react-core/dist/esm/components/Modal/ModalBox.js

raw
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/ModalBox/modal-box.mjs';
5 import topSpacer from '@patternfly/react-tokens/dist/esm/c_modal_box_m_align_top_spacer';
6 export const ModalBox = (_a) => {
7 var { children, className, variant = 'default', position, positionOffset, 'aria-labelledby': ariaLabelledby, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedby, style } = _a, props = __rest(_a, ["children", "className", "variant", "position", "positionOffset", 'aria-labelledby', 'aria-label', 'aria-describedby', "style"]);
8 if (positionOffset) {
9 style = style || {};
10 style[topSpacer.name] = positionOffset;
11 }
12 return (_jsx("div", Object.assign({ role: "dialog", "aria-label": ariaLabel || null, "aria-labelledby": ariaLabelledby || null, "aria-describedby": ariaDescribedby, "aria-modal": "true", className: css(styles.modalBox, className, position === 'top' && styles.modifiers.alignTop, variant === 'large' && styles.modifiers.lg, variant === 'small' && styles.modifiers.sm, variant === 'medium' && styles.modifiers.md), style: style }, props, { children: children })));
13 };
14 ModalBox.displayName = 'ModalBox';
15 //# sourceMappingURL=ModalBox.js.map