aboutsummaryrefslogtreecommitdiff
path: root/src/components/CartFlyoutToggle.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/CartFlyoutToggle.tsx')
-rw-r--r--src/components/CartFlyoutToggle.tsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components/CartFlyoutToggle.tsx b/src/components/CartFlyoutToggle.tsx
new file mode 100644
index 000000000..14ce1c70d
--- /dev/null
+++ b/src/components/CartFlyoutToggle.tsx
@@ -0,0 +1,7 @@
+import { useStore } from '@nanostores/preact';
+import { isCartOpen } from '../cartStore';
+
+export default function CartFlyoutToggle() {
+ const $isCartOpen = useStore(isCartOpen);
+ return <button onClick={() => isCartOpen.set(!$isCartOpen)}>Cart</button>;
+}