bind html with switch for manage extension setting (#10553)
option Co-authored-by: Neeraj <neerajv@thirdrocktechkno.com>
This commit is contained in:
parent
3f60ccabcb
commit
99a375e354
2 changed files with 6 additions and 2 deletions
|
@ -35,6 +35,9 @@ interface IProps {
|
||||||
|
|
||||||
// Called when the checked state changes. First argument will be the new state.
|
// Called when the checked state changes. First argument will be the new state.
|
||||||
onChange(checked: boolean): void;
|
onChange(checked: boolean): void;
|
||||||
|
|
||||||
|
// id to bind with other elements
|
||||||
|
id?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Controlled Toggle Switch element, written with Accessibility in mind
|
// Controlled Toggle Switch element, written with Accessibility in mind
|
||||||
|
|
|
@ -70,13 +70,14 @@ export default class SetIntegrationManager extends React.Component<IProps, IStat
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_SetIntegrationManager">
|
<label className="mx_SetIntegrationManager" htmlFor="toggle_integration">
|
||||||
<div className="mx_SettingsFlag">
|
<div className="mx_SettingsFlag">
|
||||||
<div className="mx_SetIntegrationManager_heading_manager">
|
<div className="mx_SetIntegrationManager_heading_manager">
|
||||||
<span className="mx_SettingsTab_heading">{_t("Manage integrations")}</span>
|
<span className="mx_SettingsTab_heading">{_t("Manage integrations")}</span>
|
||||||
<span className="mx_SettingsTab_subheading">{managerName}</span>
|
<span className="mx_SettingsTab_subheading">{managerName}</span>
|
||||||
</div>
|
</div>
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
|
id="toggle_integration"
|
||||||
checked={this.state.provisioningEnabled}
|
checked={this.state.provisioningEnabled}
|
||||||
disabled={false}
|
disabled={false}
|
||||||
onChange={this.onProvisioningToggled}
|
onChange={this.onProvisioningToggled}
|
||||||
|
@ -89,7 +90,7 @@ export default class SetIntegrationManager extends React.Component<IProps, IStat
|
||||||
"send room invites, and set power levels on your behalf.",
|
"send room invites, and set power levels on your behalf.",
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</label>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue