mirror of
https://github.com/lainbo/component-party.git
synced 2026-04-05 13:09:03 +08:00
* feat(qwik): add slot fallback example * feat(qwik): add form input examples * feat(qwik): add webapp features examples * docs(qwik): update qwik progress * docs(qwik): update qwik progress
19 lines
438 B
TypeScript
19 lines
438 B
TypeScript
import { component$, useStore, $ } from '@builder.io/qwik';
|
|
|
|
const IsAvailable = component$(() => {
|
|
const store = useStore({ isAvailable: false });
|
|
|
|
const handleChange = $(() => {
|
|
store.isAvailable = !store.isAvailable;
|
|
});
|
|
|
|
return (
|
|
<>
|
|
<input id="is-available" type="checkbox" checked={store.isAvailable} onChange$={handleChange} />
|
|
<label for="is-available">Is available</label>
|
|
</>
|
|
);
|
|
});
|
|
|
|
export default IsAvailable;
|