0.1.3 #4
@@ -115,7 +115,7 @@ export const make = <Args extends readonly any[], A extends React.ReactNode, E,
|
||||
)
|
||||
|
||||
export const withFunctionComponentSignature: {
|
||||
<F extends FunctionComponent>(): <T extends Component<F, any, any>>(self: T) =>
|
||||
<F extends FunctionComponent>(): <T extends Component<any, any, any>>(self: T) =>
|
||||
& Omit<T, keyof Component.AsComponent<T>>
|
||||
& Component<F, Component.Error<T>, Component.Context<T>>
|
||||
} = () => identity
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
import { TextField } from "@radix-ui/themes"
|
||||
import { Effect } from "effect"
|
||||
import { Component } from "effect-fc"
|
||||
import { Hooks } from "effect-fc/hooks"
|
||||
import { JSX } from "react"
|
||||
|
||||
|
||||
export namespace TextInput {
|
||||
export interface Props<A, R> extends Hooks.useInput.Options<A, R>, TextField.RootProps {}
|
||||
}
|
||||
|
||||
export class TextInput extends Component.make(function* TextInput(props: TextInput.Props<A, R>) {
|
||||
export class TextInput extends Component.make(Effect.fnUntraced(function* TextInput <A, R>(props: TextInput.Props<A, R>) {
|
||||
return <></>
|
||||
}) {}
|
||||
})).pipe(
|
||||
Component.withFunctionComponentSignature<<A, R>(props: TextInput.Props<A, R>) => JSX.Element>()
|
||||
) {}
|
||||
|
||||
Reference in New Issue
Block a user