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

Commit b12a272

Browse files
authored
Use AccessibleButton for 'In reply to' link button on ReplyChain (#8726)
- Remove ButtonResetDefault mixin to respect the concept of cascading Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
1 parent b776cc8 commit b12a272

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

res/css/views/elements/_ReplyChain.scss

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,19 @@ limitations under the License.
1515
*/
1616

1717
.mx_ReplyChain {
18-
margin-top: 0;
19-
margin-left: 0;
20-
margin-right: 0;
21-
margin-bottom: 8px;
22-
padding: 0 10px;
18+
margin: 0 0 $spacing-8 0;
19+
padding: 0 10px; // TODO: Use a spacing variable
2320
border-left: 2px solid $accent;
2421
border-radius: 2px;
2522

2623
.mx_ReplyChain_show {
27-
@mixin ButtonResetDefault;
28-
color: inherit;
24+
&.mx_AccessibleButton_kind_link_inline {
25+
padding: 0;
26+
color: unset;
2927

30-
&:hover {
31-
color: $links;
28+
&:hover {
29+
color: $links;
30+
}
3231
}
3332
}
3433

src/components/views/elements/ReplyChain.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { Action } from "../../../dispatcher/actions";
3232
import Spinner from './Spinner';
3333
import ReplyTile from "../rooms/ReplyTile";
3434
import Pill, { PillType } from './Pill';
35-
import { ButtonEvent } from './AccessibleButton';
35+
import AccessibleButton, { ButtonEvent } from './AccessibleButton';
3636
import { getParentEventId, shouldDisplayReply } from '../../../utils/Reply';
3737
import RoomContext from "../../../contexts/RoomContext";
3838
import { MatrixClientPeg } from '../../../MatrixClientPeg';
@@ -217,9 +217,13 @@ export default class ReplyChain extends React.Component<IProps, IState> {
217217
{
218218
_t('<a>In reply to</a> <pill>', {}, {
219219
'a': (sub) => (
220-
<button onClick={this.onQuoteClick} className="mx_ReplyChain_show">
220+
<AccessibleButton
221+
kind="link_inline"
222+
className="mx_ReplyChain_show"
223+
onClick={this.onQuoteClick}
224+
>
221225
{ sub }
222-
</button>
226+
</AccessibleButton>
223227
),
224228
'pill': (
225229
<Pill

0 commit comments

Comments
 (0)