diff options
author | 2024-03-13 17:35:33 +0800 | |
---|---|---|
committer | 2024-03-13 17:35:33 +0800 | |
commit | 8dceb5eb36226f1d097d02c47e1b24231dc333d1 (patch) | |
tree | 22662b9b3bbb9555d7152b4239fac00d55b9d1b0 /examples/framework-preact/src/components/Counter.tsx | |
parent | f456fed23cfffd5b7d09d1b541f858a90f5ea20f (diff) | |
download | astro-8dceb5eb36226f1d097d02c47e1b24231dc333d1.tar.gz astro-8dceb5eb36226f1d097d02c47e1b24231dc333d1.tar.zst astro-8dceb5eb36226f1d097d02c47e1b24231dc333d1.zip |
Fix check example CI fail (#10415)
Diffstat (limited to 'examples/framework-preact/src/components/Counter.tsx')
-rw-r--r-- | examples/framework-preact/src/components/Counter.tsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/framework-preact/src/components/Counter.tsx b/examples/framework-preact/src/components/Counter.tsx index f7db88c6d..a63bf0cd7 100644 --- a/examples/framework-preact/src/components/Counter.tsx +++ b/examples/framework-preact/src/components/Counter.tsx @@ -1,11 +1,17 @@ -import { h, Fragment } from 'preact'; +import type { ComponentChildren } from 'preact'; +import type { Signal } from '@preact/signals'; import { lazy, Suspense } from 'preact/compat'; import './Counter.css'; const Message = lazy(async () => import('./Message')); const Fallback = () => <p>Loading...</p>; -export default function Counter({ children, count }) { +type Props = { + children: ComponentChildren; + count: Signal<number>; +}; + +export default function Counter({ children, count }: Props) { const add = () => count.value++; const subtract = () => count.value--; |