Skip to content

Commit 5061882

Browse files
fix(admin): "Coming soon" tooltip not showing on disabled "Add domain" button (#1632)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f61db6e commit 5061882

2 files changed

Lines changed: 15 additions & 16 deletions

File tree

‎web/sdk/admin/views/organizations/details/security/block-organization.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ const BlockOrganizationDialog = () => {
132132
color={componentConfig.btnColor}
133133
size="small"
134134
data-test-id="block-orgnanization-button"
135+
style={{ alignSelf: "center" }}
135136
>
136137
{componentConfig.btnText}
137138
</Button>

‎web/sdk/admin/views/organizations/details/security/index.tsx‎

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
Button,
33
Flex,
4-
IconButton,
54
Separator,
65
Text,
76
Tooltip,
@@ -34,21 +33,20 @@ const AddDomainSection = () => {
3433
</Text>
3534
</Flex>
3635
<Tooltip>
37-
<Tooltip.Trigger
38-
render={
39-
<Button
40-
variant="outline"
41-
color="neutral"
42-
leadingIcon={<PlusIcon />}
43-
size="small"
44-
data-test-id="add-domain-button"
45-
disabled={true}
46-
>
47-
Add domain
48-
</Button>
49-
}
50-
/>
51-
<Tooltip.Content>Coming soon</Tooltip.Content>
36+
{/* Flex is wrapper element to enable tooltip as button doesn't allow pointer-events while disabled */}
37+
<Tooltip.Trigger render={<Flex style={{ alignSelf: "center" }} />}>
38+
<Button
39+
variant="outline"
40+
color="neutral"
41+
leadingIcon={<PlusIcon />}
42+
size="small"
43+
data-test-id="add-domain-button"
44+
disabled={true}
45+
>
46+
Add domain
47+
</Button>
48+
</Tooltip.Trigger>
49+
<Tooltip.Content side="bottom">Coming soon</Tooltip.Content>
5250
</Tooltip>
5351
</Flex>
5452
);

0 commit comments

Comments
 (0)