Add React shortcut manager and editor
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
export function UtilityMenus({ onPreferences }: { onPreferences: () => void }) {
|
||||
export function UtilityMenus({ onPreferences, onShortcuts }: { onPreferences: () => void; onShortcuts: () => void }) {
|
||||
const [open, setOpen] = useState("");
|
||||
return <div className="utility-menus">
|
||||
<style>{`
|
||||
@@ -16,6 +16,7 @@ export function UtilityMenus({ onPreferences }: { onPreferences: () => void }) {
|
||||
onClick={() => setOpen(previous => previous === "Tools" ? "" : "Tools")}>Tools
|
||||
{open === "Tools" && <div className="dropdown" role="menu" aria-label="Tools">
|
||||
<button type="button" onClick={() => { setOpen(""); onPreferences(); }}>Preferences…</button>
|
||||
<button type="button" onClick={() => { setOpen(""); onShortcuts(); }}>Customize shortcuts…</button>
|
||||
<a href="/help.html" target="_blank" rel="noopener">Help / documentation</a>
|
||||
<span>Customize / Units calculator: P3</span>
|
||||
</div>}
|
||||
|
||||
Reference in New Issue
Block a user