import React, { useState } from "react"; import { Mgba } from "./mgba"; import { BindingsControl, DefaultBindingsSet, Bindings } from "./bindings"; import { styled } from "styled-components"; import { useOnKeyUp } from "./useOnKeyUp.hook"; const BindingsDialog = styled.dialog` border-radius: 5px; margin-top: 20px; `; const VolumeLabel = styled.label` display: flex; gap: 10px; margin-bottom: 20px; `; const CloseButton = styled.button` width: 100%; margin-top: 20px; `; function App() { const [volume, setVolume] = useState(1.0); const [bindings, setBindings] = useState(DefaultBindingsSet()); const [paused, setPaused] = useState(false); const [showBindings, setShowBindings] = useState(false); useOnKeyUp("Escape", () => { setShowBindings(!showBindings); }); return (