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

Use AccessibleButton for 'Reset All' link button on SetupEncryptionBody #8730

Merged
merged 2 commits into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions res/css/structures/auth/_SetupEncryptionBody.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ limitations under the License.
.mx_SetupEncryptionBody_reset {
color: $light-fg-color;
margin-top: $font-14px;
Copy link
Contributor Author

@luixxiul luixxiul Jun 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the value for for font size is not supposed to be used as a margin value, btw. It needs a comment at least.

}

.mx_SetupEncryptionBody_reset_link {
@mixin ButtonResetDefault;
color: $alert;
.mx_SetupEncryptionBody_reset_link {
&.mx_AccessibleButton_kind_link_inline {
padding: 0;
color: $alert;
}
}
}
8 changes: 5 additions & 3 deletions src/components/structures/auth/SetupEncryptionBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,13 @@ export default class SetupEncryptionBody extends React.Component<IProps, IState>
</div>
<div className="mx_SetupEncryptionBody_reset">
{ _t("Forgotten or lost all recovery methods? <a>Reset all</a>", null, {
a: (sub) => <button
a: (sub) => <AccessibleButton
kind="link_inline"
className="mx_SetupEncryptionBody_reset_link"
onClick={this.onResetClick}
className="mx_SetupEncryptionBody_reset_link mx_Dialog_nonDialogButton">
>
{ sub }
</button>,
</AccessibleButton>,
}) }
</div>
</div>
Expand Down