@balena/ui-shared-components 8.0.1 → 8.0.2
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.
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { Tooltip, Typography } from '@mui/material';
|
|
3
4
|
/**
|
|
4
5
|
* This component will truncate text depending on the settings passed by props.
|
|
5
6
|
*/
|
|
6
|
-
export const Truncate = (
|
|
7
|
-
|
|
7
|
+
export const Truncate = (_a) => {
|
|
8
|
+
var { children, lineCamp, tooltip } = _a, typographyProps = __rest(_a, ["children", "lineCamp", "tooltip"]);
|
|
9
|
+
return (_jsx(Tooltip, { title: tooltip && typeof children === 'string' ? children : undefined, children: _jsx(Typography, Object.assign({ component: "span" }, typographyProps, { sx: {
|
|
8
10
|
lineHeight: '2rem',
|
|
9
11
|
display: '-webkit-box',
|
|
10
12
|
overflow: 'hidden !important',
|
|
11
13
|
textOverflow: 'ellipsis',
|
|
12
14
|
WebkitLineClamp: lineCamp,
|
|
13
15
|
WebkitBoxOrient: 'vertical',
|
|
14
|
-
}, children: children }) }));
|
|
16
|
+
}, children: children })) }));
|
|
15
17
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@balena/ui-shared-components",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"files": [
|
|
@@ -110,6 +110,6 @@
|
|
|
110
110
|
},
|
|
111
111
|
"homepage": "https://github.com/balena-io/ui-shared-components#readme",
|
|
112
112
|
"versionist": {
|
|
113
|
-
"publishedAt": "2024-08-
|
|
113
|
+
"publishedAt": "2024-08-12T20:15:59.711Z"
|
|
114
114
|
}
|
|
115
115
|
}
|