summaryrefslogtreecommitdiff
path: root/frontend/src/components/QuickAccessVisibleState.tsx
diff options
context:
space:
mode:
authorAAGaming <aa@mail.catvibers.me>2022-10-14 23:33:16 -0400
committerGitHub <noreply@github.com>2022-10-14 23:33:16 -0400
commit87a7361dc76949325421d9579e1e1813e84dcc1e (patch)
tree463574c28429c4196b44a3ac1c58b52765744b26 /frontend/src/components/QuickAccessVisibleState.tsx
parentacdea6da44fc3640934b10e40f9f73ecf3bb592a (diff)
downloaddecky-loader-87a7361dc76949325421d9579e1e1813e84dcc1e.tar.gz
decky-loader-87a7361dc76949325421d9579e1e1813e84dcc1e.zip
Allow B button to close active plugin and return to menu. (#218)v2.2.6-pre1
Diffstat (limited to 'frontend/src/components/QuickAccessVisibleState.tsx')
-rw-r--r--frontend/src/components/QuickAccessVisibleState.tsx13
1 files changed, 13 insertions, 0 deletions
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>;
+};