Debian Codegraph @

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

raw
1 import { __rest } from "tslib";
2 import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3 import styles from '@patternfly/react-styles/css/components/Banner/banner.mjs';
4 import { css } from '@patternfly/react-styles';
5 export const Banner = (_a) => {
6 var { children, className, screenReaderText, isSticky = false, isPill = false, color, status } = _a, props = __rest(_a, ["children", "className", "screenReaderText", "isSticky", "isPill", "color", "status"]);
7 const getStatusOrColorModifier = () => {
8 if (status) {
9 return styles.modifiers[status];
10 }
11 if (color) {
12 return styles.modifiers[color];
13 }
14 };
15 return (_jsxs("div", Object.assign({ className: css(styles.banner, getStatusOrColorModifier(), isSticky && styles.modifiers.sticky, isPill && styles.modifiers.pill, className) }, props, { children: [screenReaderText && _jsx("span", { className: "pf-v6-screen-reader", children: screenReaderText }), children] })));
16 };
17 Banner.displayName = 'Banner';
18 //# sourceMappingURL=Banner.js.map