1 | import { __rest } from "tslib";
|
2 | import * as React from 'react';
|
3 | import { css } from '@patternfly/react-styles';
|
4 | import styles from '@patternfly/react-styles/css/components/Content/content';
|
5 | import { useOUIAProps } from '../../helpers';
|
6 | export var TextVariants;
|
7 | (function (TextVariants) {
|
8 | TextVariants["h1"] = "h1";
|
9 | TextVariants["h2"] = "h2";
|
10 | TextVariants["h3"] = "h3";
|
11 | TextVariants["h4"] = "h4";
|
12 | TextVariants["h5"] = "h5";
|
13 | TextVariants["h6"] = "h6";
|
14 | TextVariants["p"] = "p";
|
15 | TextVariants["a"] = "a";
|
16 | TextVariants["small"] = "small";
|
17 | TextVariants["blockquote"] = "blockquote";
|
18 | TextVariants["pre"] = "pre";
|
19 | })(TextVariants || (TextVariants = {}));
|
20 | export const Text = (_a) => {
|
21 | var { children = null, className = '', component = TextVariants.p, isVisitedLink = false, ouiaId, ouiaSafe = true } = _a, props = __rest(_a, ["children", "className", "component", "isVisitedLink", "ouiaId", "ouiaSafe"]);
|
22 | const Component = component;
|
23 | const ouiaProps = useOUIAProps(Text.displayName, ouiaId, ouiaSafe);
|
24 | return (React.createElement(Component, Object.assign({}, ouiaProps, props, { "data-pf-content": true, className: css(isVisitedLink && component === TextVariants.a && styles.modifiers.visited, className) }), children));
|
25 | };
|
26 | Text.displayName = 'Text';
|
27 |
|
\ | No newline at end of file |