(null);
useEffect(() => {
setIsTruncated(
@@ -58,13 +66,18 @@ const TruncatedTextWithTooltip: React.FC = ({ children, ...props }) => {
);
- return isTruncated ? {div} : div;
+ return isTruncated ? (
+ {div}
+ ) : (
+ div
+ );
};
const MetadataItem: React.FC<{
label: ReactNode;
value: ReactNode;
-}> = ({ label, value }) => (
+ tooltipText?: string;
+}> = ({ label, value, tooltipText }) => (
css`
font-size: ${theme.typography.sizes.s}px;
@@ -89,7 +102,9 @@ const MetadataItem: React.FC<{
min-width: 0;
`}
>
- {value}
+
+ {value}
+
);
@@ -273,6 +288,7 @@ const AddSliceCard: React.FC<{
datasourceName
)
}
+ tooltipText={datasourceName}
/>