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>
This commit is contained in:
parent
b776cc8c1f
commit
b12a272385
2 changed files with 15 additions and 12 deletions
|
@ -15,22 +15,21 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
.mx_ReplyChain {
|
||||
margin-top: 0;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
margin-bottom: 8px;
|
||||
padding: 0 10px;
|
||||
margin: 0 0 $spacing-8 0;
|
||||
padding: 0 10px; // TODO: Use a spacing variable
|
||||
border-left: 2px solid $accent;
|
||||
border-radius: 2px;
|
||||
|
||||
.mx_ReplyChain_show {
|
||||
@mixin ButtonResetDefault;
|
||||
color: inherit;
|
||||
&.mx_AccessibleButton_kind_link_inline {
|
||||
padding: 0;
|
||||
color: unset;
|
||||
|
||||
&:hover {
|
||||
color: $links;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.mx_ReplyChain_color1 {
|
||||
border-left-color: $username-variant1-color;
|
||||
|
|
|
@ -32,7 +32,7 @@ import { Action } from "../../../dispatcher/actions";
|
|||
import Spinner from './Spinner';
|
||||
import ReplyTile from "../rooms/ReplyTile";
|
||||
import Pill, { PillType } from './Pill';
|
||||
import { ButtonEvent } from './AccessibleButton';
|
||||
import AccessibleButton, { ButtonEvent } from './AccessibleButton';
|
||||
import { getParentEventId, shouldDisplayReply } from '../../../utils/Reply';
|
||||
import RoomContext from "../../../contexts/RoomContext";
|
||||
import { MatrixClientPeg } from '../../../MatrixClientPeg';
|
||||
|
@ -217,9 +217,13 @@ export default class ReplyChain extends React.Component<IProps, IState> {
|
|||
{
|
||||
_t('<a>In reply to</a> <pill>', {}, {
|
||||
'a': (sub) => (
|
||||
<button onClick={this.onQuoteClick} className="mx_ReplyChain_show">
|
||||
<AccessibleButton
|
||||
kind="link_inline"
|
||||
className="mx_ReplyChain_show"
|
||||
onClick={this.onQuoteClick}
|
||||
>
|
||||
{ sub }
|
||||
</button>
|
||||
</AccessibleButton>
|
||||
),
|
||||
'pill': (
|
||||
<Pill
|
||||
|
|
Loading…
Reference in a new issue