| 1 |
import { __rest } from "tslib"; |
| 2 |
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } 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 { ModalBoxDescription } from './ModalBoxDescription'; |
| 6 |
import { ModalBoxTitle } from './ModalBoxTitle'; |
| 7 |
export const ModalHeader = (_a) => { |
| 8 |
var { children, className, descriptorId, description, labelId, title, titleIconVariant, titleScreenReaderText, help } = _a, props = __rest(_a, ["children", "className", "descriptorId", "description", "labelId", "title", "titleIconVariant", "titleScreenReaderText", "help"]); |
| 9 |
const headerContent = children ? (children) : (_jsxs(_Fragment, { children: [_jsx(ModalBoxTitle, { title: title, titleIconVariant: titleIconVariant, titleScreenReaderText: titleScreenReaderText, id: labelId }), description && _jsx(ModalBoxDescription, { id: descriptorId, children: description })] })); |
| 10 |
return (_jsxs("header", Object.assign({ className: css(styles.modalBoxHeader, help && styles.modifiers.help, className) }, props, { children: [help && (_jsxs(_Fragment, { children: [_jsx("div", { className: css(styles.modalBoxHeaderMain), children: headerContent }), _jsx("div", { className: `${styles.modalBoxHeader}-help`, children: help })] })), !help && headerContent] }))); |
| 11 |
}; |
| 12 |
ModalHeader.displayName = 'ModalHeader'; |
| 13 |
//# sourceMappingURL=ModalHeader.js.map |