UNPKG

1.36 kBJavaScriptView Raw
1import { __rest } from "tslib";
2import * as React from 'react';
3import { css } from '@patternfly/react-styles';
4import styles from '@patternfly/react-styles/css/components/Brand/brand';
5import { setBreakpointCssVars } from '../../helpers';
6export const Brand = (_a) => {
7 var { className = '', src = '', alt, children, widths, heights, style } = _a, props = __rest(_a, ["className", "src", "alt", "children", "widths", "heights", "style"]);
8 if (children !== undefined && widths !== undefined) {
9 style = Object.assign(Object.assign({}, style), setBreakpointCssVars(widths, '--pf-c-brand--Width'));
10 }
11 if (children !== undefined && heights !== undefined) {
12 style = Object.assign(Object.assign({}, style), setBreakpointCssVars(heights, '--pf-c-brand--Height'));
13 }
14 return (
15 /** the brand component currently contains no styling the 'pf-c-brand' string will be used for the className */
16 children !== undefined ? (React.createElement("picture", Object.assign({ className: css(styles.brand, styles.modifiers.picture, className), style: style }, props),
17 children,
18 React.createElement("img", { src: src, alt: alt }))) : (React.createElement("img", Object.assign({}, props, { className: css(styles.brand, className), src: src, alt: alt }))));
19};
20Brand.displayName = 'Brand';
21//# sourceMappingURL=Brand.js.map
\No newline at end of file