diff --git a/packages/example/src/lib/TextInput.tsx b/packages/example/src/lib/TextInput.tsx
index d678adc..969b96d 100644
--- a/packages/example/src/lib/TextInput.tsx
+++ b/packages/example/src/lib/TextInput.tsx
@@ -1,20 +1,22 @@
import { TextField } from "@radix-ui/themes"
-import { Effect } from "effect"
+import { Effect, Schema } from "effect"
import { Component } from "effect-fc"
import { useInput } from "effect-fc/hooks"
-import { JSX } from "react"
export namespace TextInput {
- export interface Props extends useInput.Options, TextField.RootProps {}
+ export interface Props extends Omit, "schema">, TextField.RootProps {}
}
-export class TextInput extends Component.make(
- Effect.fnUntraced(function* TextInput (props: TextInput.Props) {
- const input = yield* useInput(props)
- return <>>
+export const TextInput = (schema: Schema.Schema) => Component.make(
+ Effect.fnUntraced(function*(props: TextInput.Props) {
+ const input = yield* useInput({ ...props, schema })
+ return (
+
+
+
+ )
})
-).pipe(
- Component.withFunctionComponentSignature<(props: TextInput.Props) => JSX.Element>()
-) {}
-TextInput["~Error"]
\ No newline at end of file
+)