Skip to content

Commit fe17b1c

Browse files
committed
feat: add tooltip for assign default org switch
1 parent 3822b2e commit fe17b1c

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

site/src/pages/DeploymentSettingsPage/IdpOrgSyncPage/IdpOrgSyncPageView.tsx

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ import { ErrorAlert } from "components/Alert/ErrorAlert";
1515
import { Button } from "components/Button/Button";
1616
import { ChooseOne, Cond } from "components/Conditionals/ChooseOne";
1717
import { EmptyState } from "components/EmptyState/EmptyState";
18+
import {
19+
HelpTooltip,
20+
HelpTooltipContent,
21+
HelpTooltipText,
22+
HelpTooltipTrigger,
23+
} from "components/HelpTooltip/HelpTooltip";
1824
import { Input } from "components/Input/Input";
1925
import { Label } from "components/Label/Label";
2026
import { Loader } from "components/Loader/Loader";
@@ -42,7 +48,7 @@ interface IdpSyncPageViewProps {
4248
error?: unknown;
4349
}
4450

45-
export const IdpSyncPageView: FC<IdpSyncPageViewProps> = ({
51+
export const IdpOrgSyncPageView: FC<IdpSyncPageViewProps> = ({
4652
organizationSyncSettings,
4753
organizations,
4854
onSubmit,
@@ -136,9 +142,12 @@ export const IdpSyncPageView: FC<IdpSyncPageViewProps> = ({
136142
form.handleSubmit();
137143
}}
138144
/>
139-
<Label htmlFor={ORGANIZATION_ASSIGN_DEFAULT_ID}>
140-
Assign Default Organization
141-
</Label>
145+
<span className="flex flex-row items-center gap-1">
146+
<Label htmlFor={ORGANIZATION_ASSIGN_DEFAULT_ID}>
147+
Assign Default Organization
148+
</Label>
149+
<AssignDefaultOrgHelpTooltip />
150+
</span>
142151
</div>
143152
</div>
144153
<p className="text-content-secondary text-2xs m-0">
@@ -330,4 +339,17 @@ const TableLoader = () => {
330339
);
331340
};
332341

333-
export default IdpSyncPageView;
342+
export const AssignDefaultOrgHelpTooltip: FC = () => {
343+
return (
344+
<HelpTooltip>
345+
<HelpTooltipTrigger />
346+
<HelpTooltipContent>
347+
<HelpTooltipText>
348+
Disabling will remove all users from the default organization.
349+
</HelpTooltipText>
350+
</HelpTooltipContent>
351+
</HelpTooltip>
352+
);
353+
};
354+
355+
export default IdpOrgSyncPageView;

0 commit comments

Comments
 (0)