@luscii-healthtech/web-ui 38.4.6 → 38.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -120,6 +120,12 @@ type Props = React.ComponentPropsWithoutRef<"p"> & {
|
|
|
120
120
|
* @default false
|
|
121
121
|
*/
|
|
122
122
|
clampLines?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* When `true` will apply tailwind's `capitalize` class.
|
|
125
|
+
*
|
|
126
|
+
* @default false;
|
|
127
|
+
*/
|
|
128
|
+
capitalize?: boolean;
|
|
123
129
|
"data-test-id"?: string;
|
|
124
130
|
};
|
|
125
131
|
export declare const Text: FC<Props>;
|
|
@@ -1446,7 +1446,7 @@ const allowedGroupHoverColors = {
|
|
|
1446
1446
|
};
|
|
1447
1447
|
const Text = (props) => {
|
|
1448
1448
|
var _a, _b;
|
|
1449
|
-
const { children, text, type, variant = "base", inline, color = "base", hoverColor, hoverInGroup, className, containsDangerousHtml, truncate, clampLines } = props, rest = __rest(props, ["children", "text", "type", "variant", "inline", "color", "hoverColor", "hoverInGroup", "className", "containsDangerousHtml", "truncate", "clampLines"]);
|
|
1449
|
+
const { children, text, type, variant = "base", inline, color = "base", hoverColor, hoverInGroup, className, containsDangerousHtml, truncate, clampLines, capitalize } = props, rest = __rest(props, ["children", "text", "type", "variant", "inline", "color", "hoverColor", "hoverInGroup", "className", "containsDangerousHtml", "truncate", "clampLines", "capitalize"]);
|
|
1450
1450
|
const Component = inline ? "span" : "p";
|
|
1451
1451
|
const resolvedVariant = type !== null && type !== void 0 ? type : variant;
|
|
1452
1452
|
const selectedHoverColor = hoverColor && !hoverInGroup && allowedHoverColors[hoverColor];
|
|
@@ -1466,7 +1466,8 @@ const Text = (props) => {
|
|
|
1466
1466
|
// FIXME: this class doesn't do anything without a ui-max-width
|
|
1467
1467
|
"ui-truncate": truncate,
|
|
1468
1468
|
"ui-text-two-lines-max": clampLines,
|
|
1469
|
-
"in-html-link": containsDangerousHtml
|
|
1469
|
+
"in-html-link": containsDangerousHtml,
|
|
1470
|
+
capitalize
|
|
1470
1471
|
},
|
|
1471
1472
|
// can be used to overwrite other classes like the color
|
|
1472
1473
|
className
|