Skip to content

Commit 88a9db4

Browse files
1561 Fixes double copy icon in subscription detail page at the in-use-by-subscriptions section
1 parent cd0d38f commit 88a9db4

File tree

3 files changed

+28
-16
lines changed

3 files changed

+28
-16
lines changed

.changeset/silent-plums-invite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@orchestrator-ui/orchestrator-ui-components': patch
3+
---
4+
5+
1561 Fixes double copy icon in subscription detail page at the in-use-by-subscriptions section

packages/orchestrator-ui-components/src/components/WfoSubscription/WfoInUseByRelations.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export const WfoInUseByRelations = ({
5252
value: (
5353
<WfoFirstPartUUID
5454
UUID={inUseByRelationDetails.subscriptionId}
55+
showCopyIcon={false}
5556
/>
5657
),
5758
textToCopy: inUseByRelationDetails.subscriptionId,

packages/orchestrator-ui-components/src/components/WfoTable/WfoFirstPartUUID/WfoFirstPartUUID.tsx

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,36 @@ import { COPY_ICON_CLASS, getStyles } from './styles';
1010

1111
export type WfoFirstUUIDPartProps = {
1212
UUID: string;
13+
showCopyIcon?: boolean;
1314
};
1415

15-
export const WfoFirstPartUUID: FC<WfoFirstUUIDPartProps> = ({ UUID }) => {
16+
export const WfoFirstPartUUID: FC<WfoFirstUUIDPartProps> = ({
17+
UUID,
18+
showCopyIcon = true,
19+
}) => {
1620
const { uuidFieldStyle, clickable } = useWithOrchestratorTheme(getStyles);
1721
const { theme } = useOrchestratorTheme();
1822

1923
return (
2024
<span css={uuidFieldStyle}>
2125
{getFirstUuidPart(UUID)}
22-
<EuiCopy textToCopy={UUID}>
23-
{(copy) => (
24-
<div
25-
className={COPY_ICON_CLASS}
26-
onClick={copy}
27-
css={clickable}
28-
>
29-
<WfoClipboardCopy
30-
width={16}
31-
height={16}
32-
color={theme.colors.mediumShade}
33-
/>
34-
</div>
35-
)}
36-
</EuiCopy>
26+
{showCopyIcon && (
27+
<EuiCopy textToCopy={UUID}>
28+
{(copy) => (
29+
<div
30+
className={COPY_ICON_CLASS}
31+
onClick={copy}
32+
css={clickable}
33+
>
34+
<WfoClipboardCopy
35+
width={16}
36+
height={16}
37+
color={theme.colors.mediumShade}
38+
/>
39+
</div>
40+
)}
41+
</EuiCopy>
42+
)}
3743
</span>
3844
);
3945
};

0 commit comments

Comments
 (0)