From 87a7361dc76949325421d9579e1e1813e84dcc1e Mon Sep 17 00:00:00 2001
From: AAGaming <aa@mail.catvibers.me>
Date: Fri, 14 Oct 2022 23:33:16 -0400
Subject: Allow B button to close active plugin and return to menu. (#218)

---
 frontend/src/components/QuickAccessVisibleState.tsx | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 frontend/src/components/QuickAccessVisibleState.tsx

(limited to 'frontend/src/components/QuickAccessVisibleState.tsx')

diff --git a/frontend/src/components/QuickAccessVisibleState.tsx b/frontend/src/components/QuickAccessVisibleState.tsx
new file mode 100644
index 00000000..b5ee3b98
--- /dev/null
+++ b/frontend/src/components/QuickAccessVisibleState.tsx
@@ -0,0 +1,13 @@
+import { FC, createContext, useContext } from 'react';
+
+const QuickAccessVisibleState = createContext<boolean>(true);
+
+export const useQuickAccessVisible = () => useContext(QuickAccessVisibleState);
+
+interface Props {
+  visible: boolean;
+}
+
+export const QuickAccessVisibleStateProvider: FC<Props> = ({ children, visible }) => {
+  return <QuickAccessVisibleState.Provider value={visible}>{children}</QuickAccessVisibleState.Provider>;
+};
-- 
cgit v1.2.3

