This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +53
-24
lines changed
src/components/views/settings
test/components/views/settings Expand file tree Collapse file tree 6 files changed +53
-24
lines changed Original file line number Diff line number Diff line change 277
277
@import " ./views/settings/_ImageSizePanel.scss" ;
278
278
@import " ./views/settings/_IntegrationManager.scss" ;
279
279
@import " ./views/settings/_JoinRuleSettings.scss" ;
280
+ @import " ./views/settings/_KeyboardShortcut.scss" ;
280
281
@import " ./views/settings/_LayoutSwitcher.scss" ;
281
282
@import " ./views/settings/_Notifications.scss" ;
282
283
@import " ./views/settings/_PhoneNumbers.scss" ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2020 The Matrix.org Foundation C.I.C.
3
+ Copyright 2021 Šimon Brandner <[email protected] >
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ */
17
+
18
+ .mx_KeyboardShortcut {
19
+ kbd {
20
+ padding : 5px ;
21
+ border-radius : 4px ;
22
+ background-color : $header-panel-bg-color ;
23
+ margin-right : 5px ;
24
+ min-width : 20px ;
25
+ text-align : center ;
26
+ display : inline-block ;
27
+ border : 1px solid $kbd-border-color ;
28
+ box-shadow : 0 2px $kbd-border-color ;
29
+ margin-bottom : 4px ;
30
+ text-transform : capitalize ;
31
+
32
+ & + kbd {
33
+ margin-left : 5px ;
34
+ }
35
+ }
36
+ }
Original file line number Diff line number Diff line change @@ -21,22 +21,4 @@ limitations under the License.
21
21
justify-content : space-between ;
22
22
align-items : center ;
23
23
}
24
-
25
- kbd {
26
- padding : 5px ;
27
- border-radius : 4px ;
28
- background-color : $header-panel-bg-color ;
29
- margin-right : 5px ;
30
- min-width : 20px ;
31
- text-align : center ;
32
- display : inline-block ;
33
- border : 1px solid $kbd-border-color ;
34
- box-shadow : 0 2px $kbd-border-color ;
35
- margin-bottom : 4px ;
36
- text-transform : capitalize ;
37
-
38
- & + kbd {
39
- margin-left : 5px ;
40
- }
41
- }
42
24
}
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ export const KeyboardShortcut: React.FC<IKeyboardShortcutProps> = ({ value }) =>
58
58
modifiersElement . push ( < KeyboardKey key = "shiftKey" name = { Key . SHIFT } /> ) ;
59
59
}
60
60
61
- return < div >
61
+ return < div className = "mx_KeyboardShortcut" >
62
62
{ modifiersElement }
63
63
< KeyboardKey name = { value . key } last />
64
64
</ div > ;
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ exports[`KeyboardShortcut doesn't render same modifier twice 1`] = `
23
23
}
24
24
}
25
25
>
26
- <div >
26
+ <div
27
+ className = " mx_KeyboardShortcut"
28
+ >
27
29
<KeyboardKey
28
30
key = " ctrlOrCmdKey"
29
31
name = " Control"
@@ -59,7 +61,9 @@ exports[`KeyboardShortcut doesn't render same modifier twice 2`] = `
59
61
}
60
62
}
61
63
>
62
- <div >
64
+ <div
65
+ className = " mx_KeyboardShortcut"
66
+ >
63
67
<KeyboardKey
64
68
key = " ctrlOrCmdKey"
65
69
name = " Control"
Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ exports[`KeyboardUserSettingsTab renders list of keyboard shortcuts 1`] = `
50
50
}
51
51
}
52
52
>
53
- <div >
53
+ <div
54
+ className = " mx_KeyboardShortcut"
55
+ >
54
56
<KeyboardKey
55
57
key = " ctrlKey"
56
58
name = " Control"
@@ -92,7 +94,9 @@ exports[`KeyboardUserSettingsTab renders list of keyboard shortcuts 1`] = `
92
94
}
93
95
}
94
96
>
95
- <div >
97
+ <div
98
+ className = " mx_KeyboardShortcut"
99
+ >
96
100
<KeyboardKey
97
101
key = " ctrlKey"
98
102
name = " Control"
@@ -160,7 +164,9 @@ exports[`KeyboardUserSettingsTab renders list of keyboard shortcuts 1`] = `
160
164
}
161
165
}
162
166
>
163
- <div >
167
+ <div
168
+ className = " mx_KeyboardShortcut"
169
+ >
164
170
<KeyboardKey
165
171
last = { true }
166
172
name = " Enter"
You can’t perform that action at this time.
0 commit comments