Use DialogButtons because reusability :((
parent
76e61b9948
commit
b002806639
|
@ -19,6 +19,7 @@ import PropTypes from 'prop-types';
|
||||||
import { _t, _td } from '../../../languageHandler';
|
import { _t, _td } from '../../../languageHandler';
|
||||||
import {PendingActionSpinner} from "../right_panel/EncryptionInfo";
|
import {PendingActionSpinner} from "../right_panel/EncryptionInfo";
|
||||||
import AccessibleButton from "../elements/AccessibleButton";
|
import AccessibleButton from "../elements/AccessibleButton";
|
||||||
|
import DialogButtons from "../elements/DialogButtons";
|
||||||
|
|
||||||
function capFirst(s) {
|
function capFirst(s) {
|
||||||
return s.charAt(0).toUpperCase() + s.slice(1);
|
return s.charAt(0).toUpperCase() + s.slice(1);
|
||||||
|
@ -90,14 +91,15 @@ export default class VerificationShowSas extends React.Component {
|
||||||
const text = _t("Waiting for %(displayName)s to verify…", {displayName});
|
const text = _t("Waiting for %(displayName)s to verify…", {displayName});
|
||||||
confirm = <PendingActionSpinner text={text} />;
|
confirm = <PendingActionSpinner text={text} />;
|
||||||
} else {
|
} else {
|
||||||
confirm = <React.Fragment>
|
// FIXME: stop using DialogButtons here once it this component is only used in the right panel verification
|
||||||
<AccessibleButton kind="primary" onClick={this.onMatchClick} className="mx_UserInfo_verify">
|
confirm = <DialogButtons
|
||||||
{_t("They match")}
|
primaryButton={_t("They match")}
|
||||||
</AccessibleButton>
|
onPrimaryButtonClick={this.onMatchClick}
|
||||||
<AccessibleButton kind="danger" onClick={this.props.onCancel} className="mx_UserInfo_verify">
|
primaryButtonClassName="mx_UserInfo_verify"
|
||||||
{_t("They don't match")}
|
cancelButton={_t("They don't match")}
|
||||||
</AccessibleButton>
|
onCancel={this.props.onCancel}
|
||||||
</React.Fragment>;
|
cancelButtonClass="mx_UserInfo_verify"
|
||||||
|
/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <div className="mx_VerificationShowSas">
|
return <div className="mx_VerificationShowSas">
|
||||||
|
|
Loading…
Reference in New Issue