Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
bind html with switch for manage extension setting (#10553)
Browse files Browse the repository at this point in the history
option

Co-authored-by: Neeraj <neerajv@thirdrocktechkno.com>
  • Loading branch information
NSV1991 and neerajv96 authored Apr 11, 2023
1 parent 3f60cca commit 99a375e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/components/views/elements/ToggleSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ interface IProps {

// Called when the checked state changes. First argument will be the new state.
onChange(checked: boolean): void;

// id to bind with other elements
id?: string;
}

// Controlled Toggle Switch element, written with Accessibility in mind
Expand Down
5 changes: 3 additions & 2 deletions src/components/views/settings/SetIntegrationManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@ export default class SetIntegrationManager extends React.Component<IProps, IStat
}

return (
<div className="mx_SetIntegrationManager">
<label className="mx_SetIntegrationManager" htmlFor="toggle_integration">
<div className="mx_SettingsFlag">
<div className="mx_SetIntegrationManager_heading_manager">
<span className="mx_SettingsTab_heading">{_t("Manage integrations")}</span>
<span className="mx_SettingsTab_subheading">{managerName}</span>
</div>
<ToggleSwitch
id="toggle_integration"
checked={this.state.provisioningEnabled}
disabled={false}
onChange={this.onProvisioningToggled}
Expand All @@ -89,7 +90,7 @@ export default class SetIntegrationManager extends React.Component<IProps, IStat
"send room invites, and set power levels on your behalf.",
)}
</div>
</div>
</label>
);
}
}

0 comments on commit 99a375e

Please sign in to comment.