querysub 0.346.0 → 0.347.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ export type ButtonProps = (
|
|
|
26
26
|
hideHotkeys?: boolean;
|
|
27
27
|
/** Immediately repeats, every animation frame */
|
|
28
28
|
immediateRepeat?: boolean;
|
|
29
|
+
hotkeyClassname?: string;
|
|
29
30
|
|
|
30
31
|
/** By default the last hotkey handler (which is probably the latest) is called. If this is
|
|
31
32
|
* true we also call this hotkey handler, no matter what.
|
|
@@ -292,19 +293,20 @@ export class Button extends qreact.Component<ButtonProps> {
|
|
|
292
293
|
{children}
|
|
293
294
|
{
|
|
294
295
|
<div class={
|
|
295
|
-
(this.props.hideHotkeys && " ")
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
((this.props.hideHotkeys && " ")
|
|
297
|
+
|| showHotkeys && hotkeys?.length && css.marginLeft(10).vbox(6).pointerEvents("none")
|
|
298
|
+
|| (
|
|
299
|
+
css.absolute.zIndex(1).pointerEvents("none")
|
|
299
300
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
301
|
+
.whiteSpace("nowrap")
|
|
302
|
+
+ " show-on-hover"
|
|
303
|
+
+ (
|
|
304
|
+
typeHotkeyPosition === "left" && css.pos("0%", "50%").offset("-100%", "-50%")
|
|
305
|
+
|| typeHotkeyPosition === "above" && css.pos("50%", "0%").offset("-50%", "-100%")
|
|
306
|
+
|| css.pos("100%", "50%").offset("6px", "-50%")
|
|
307
|
+
)
|
|
306
308
|
)
|
|
307
|
-
)
|
|
309
|
+
) + (this.props.hotkeyClassname || "")
|
|
308
310
|
}>
|
|
309
311
|
{this.props.hotkeys?.map((x, i) =>
|
|
310
312
|
<div class={
|
|
@@ -325,6 +327,7 @@ export class Button extends qreact.Component<ButtonProps> {
|
|
|
325
327
|
.transition("all 0.2s ease-in-out")
|
|
326
328
|
.whiteSpace("nowrap")
|
|
327
329
|
)
|
|
330
|
+
|
|
328
331
|
}
|
|
329
332
|
>
|
|
330
333
|
{formatHotkey(x)}
|