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

Commit 8563a54

Browse files
SekhmetjasonLaster
authored andcommitted
feat: update shortcuts modal icon (#5920)
1 parent 876bfb4 commit 8563a54

File tree

5 files changed

+22
-25
lines changed

5 files changed

+22
-25
lines changed

assets/images/Svg.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const svg = {
2525
file: require("./file.svg"),
2626
folder: require("./folder.svg"),
2727
globe: require("./globe.svg"),
28+
help: require("./help.svg"),
2829
home: require("./home.svg"),
2930
javascript: require("./javascript.svg"),
3031
jquery: require("./jquery.svg"),

assets/images/help.svg

Lines changed: 6 additions & 0 deletions
Loading

src/components/SecondaryPanes/CommandBar.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ img.reverseStepIn,
3030
img.reverseStepOut,
3131
img.replay-previous,
3232
img.replay-next,
33-
img.resume {
33+
img.resume,
34+
img.shortcuts {
3435
background-color: var(--theme-body-color);
3536
}
3637

@@ -107,6 +108,10 @@ img.resume {
107108
margin-top: 5px;
108109
}
109110

111+
.command-bar img.shortcuts {
112+
mask: url(/images/help.svg) no-repeat;
113+
}
114+
110115
.command-bar .replay-inactive {
111116
opacity: 0.5;
112117
}

src/components/SecondaryPanes/CommandBar.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ function formatKey(action) {
8181
return formatKeyShortcut(key);
8282
}
8383

84-
function debugBtn(
85-
onClick,
86-
type,
87-
className,
88-
tooltip,
89-
disabled = false,
90-
ariaPressed = false
84+
export function debugBtn(
85+
onClick: ?Function,
86+
type: string,
87+
className: string,
88+
tooltip: string,
89+
disabled: boolean = false,
90+
ariaPressed: boolean = false
9191
) {
9292
return (
9393
<CommandBarButton

src/components/SecondaryPanes/UtilsBar.js

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,9 @@
55
// @flow
66
import React, { Component } from "react";
77
import classnames from "classnames";
8+
import { debugBtn } from "./CommandBar";
89
import "./CommandBar.css";
910

10-
function debugBtn(onClick, type, className, tooltip, disabled = false) {
11-
const props = {
12-
onClick,
13-
key: type,
14-
"aria-label": tooltip,
15-
title: tooltip,
16-
disabled
17-
};
18-
19-
return (
20-
<button className={classnames(type, className)} {...props}>
21-
?
22-
</button>
23-
);
24-
}
25-
2611
type Props = {
2712
horizontal: boolean,
2813
toggleShortcutsModal: () => void
@@ -33,7 +18,7 @@ class UtilsBar extends Component<Props> {
3318
return [
3419
debugBtn(
3520
this.props.toggleShortcutsModal,
36-
"shortcut",
21+
"shortcuts",
3722
"active",
3823
L10N.getStr("shortcuts.buttonName"),
3924
false

0 commit comments

Comments
 (0)