1 | import { __rest } from "tslib";
|
2 | import * as React from 'react';
|
3 | import styles from '@patternfly/react-styles/css/components/Skeleton/skeleton';
|
4 | import { css } from '@patternfly/react-styles';
|
5 | export const Skeleton = (_a) => {
|
6 | var { className, width, height, fontSize, shape, screenreaderText } = _a, props = __rest(_a, ["className", "width", "height", "fontSize", "shape", "screenreaderText"]);
|
7 | const fontHeightClassName = fontSize
|
8 | ? Object.values(styles.modifiers).find(key => key === `pf-m-text-${fontSize}`)
|
9 | : undefined;
|
10 | return (React.createElement("div", Object.assign({}, props, { className: css(styles.skeleton, fontSize && fontHeightClassName, shape === 'circle' && styles.modifiers.circle, shape === 'square' && styles.modifiers.square, className) }, ((width || height) && {
|
11 | style: Object.assign({ '--pf-c-skeleton--Width': width ? width : undefined, '--pf-c-skeleton--Height': height ? height : undefined }, props.style)
|
12 | })),
|
13 | React.createElement("span", { className: "pf-u-screen-reader" }, screenreaderText)));
|
14 | };
|
15 | Skeleton.displayName = 'Skeleton';
|
16 |
|
\ | No newline at end of file |