aboutsummaryrefslogtreecommitdiff
path: root/src/components/CartFlyoutToggle.tsx
diff options
context:
space:
mode:
authorGravatar github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> 2025-06-05 12:45:04 +0000
committerGravatar github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> 2025-06-05 12:45:04 +0000
commitb4feb81355f9832c5698f81f8fdf33121e0189a5 (patch)
tree5b326153146a75a1e99ce8df0f04832b8cc79868 /src/components/CartFlyoutToggle.tsx
downloadastro-examples/with-nanostores.tar.gz
astro-examples/with-nanostores.tar.zst
astro-examples/with-nanostores.zip
Sync from 0947a69192ad6820970902c7c951fb0cf31fcf4bexamples/with-nanostores
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>;
+}