Skip to content

Commit c2080a6

Browse files
committed
Expand import example
1 parent 0dee3b8 commit c2080a6

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

docs/common/COMPONENTS.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type InputSchema = { rawValue: Cell<string> };
5555
type OutputSchema = { validatedValue: string | null };
5656

5757
const MyRecipe = recipe<InputSchema, OutputSchema>("MyRecipe", ({ rawValue }) => {
58-
// Example 1: Using full event object
58+
// Example 1: Using full event object
5959
const handleChange = handler<{ detail: { value: string } }, { rawValue: Cell<string> }>((e, { rawValue }) => {
6060
rawValue.set(e.detail.value);
6161
});
@@ -129,7 +129,20 @@ const addItem = handler<
129129
This example also demonstrates verbose specification of more complex types.
130130

131131
```tsx
132-
import { Default, OpaqueRef } from "commontools";
132+
import {
133+
h,
134+
derive,
135+
handler,
136+
ifElse,
137+
NAME,
138+
recipe,
139+
str,
140+
UI,
141+
OpaqueRef,
142+
Cell,
143+
Default,
144+
Opaque,
145+
} from "commontools";
133146
134147
type Charm = any;
135148

0 commit comments

Comments
 (0)