diff --git a/app/pages/project/vpcs/VpcPage.tsx b/app/pages/project/vpcs/VpcPage.tsx
index 6209e5495..dcc00bfdc 100644
--- a/app/pages/project/vpcs/VpcPage.tsx
+++ b/app/pages/project/vpcs/VpcPage.tsx
@@ -70,7 +70,9 @@ export default function VpcPage() {
{vpc.dnsName}
+
+
diff --git a/app/ui/lib/PropertiesTable.tsx b/app/ui/lib/PropertiesTable.tsx
index 8315bff80..6762d26f0 100644
--- a/app/ui/lib/PropertiesTable.tsx
+++ b/app/ui/lib/PropertiesTable.tsx
@@ -13,6 +13,7 @@ import { EmptyCell } from '~/table/cells/EmptyCell'
import { isOneOf } from '~/util/children'
import { invariant } from '~/util/invariant'
+import { CopyToClipboard } from './CopyToClipboard'
import { DateTime } from './DateTime'
import { Truncate } from './Truncate'
@@ -33,6 +34,7 @@ export function PropertiesTable({
PropertiesTable.IdRow,
PropertiesTable.DescriptionRow,
PropertiesTable.DateRow,
+ PropertiesTable.CopyableRow,
]),
'PropertiesTable only accepts specific Row components as children'
)
@@ -99,3 +101,10 @@ PropertiesTable.DateRow = ({
)
+
+PropertiesTable.CopyableRow = ({ label, text }: { label: string; text: string }) => (
+
+ {text}
+
+
+)
diff --git a/app/ui/lib/Truncate.tsx b/app/ui/lib/Truncate.tsx
index 12d63239b..27f4bc994 100644
--- a/app/ui/lib/Truncate.tsx
+++ b/app/ui/lib/Truncate.tsx
@@ -26,22 +26,28 @@ export const Truncate = ({
hasCopyButton,
tooltipDelay = 300,
}: TruncateProps) => {
- if (text.length <= maxLength) {
- return
{text}
- }
-
// Only use the tooltip if the text is longer than maxLength
- return (
- // overflow-hidden required to make inner truncate work
-
+ // "truncate" class used for CSS truncation when cell rendered narrowly
+ const content =
+ text.length <= maxLength ? (
+
{text}
+ ) : (
{truncate(text, maxLength, position)}
-
- {hasCopyButton && }
-
+ )
+
+ return (
+ // overflow-hidden required to make inner truncate work
+
+ {content}
+ {hasCopyButton && (
+
+
+
+ )}
)
}