@spaced-out/ui-design-system
Version:
Sense UI components library
16 lines • 505 B
TypeScript
import * as React from 'react';
type ReturnType = [
string,
(event: React.ChangeEvent<HTMLInputElement>) => void
];
/**
* Simple Hook to use with input tag. The primary purpose is an abstraction over input onChange property.
* () => {
* const [value, onChange] = useInputState("");
*
* return <Input type="text" value={value} onChange={onChange} />;
* }
*/
export declare const useInputState: (initialState?: string) => ReturnType;
export {};
//# sourceMappingURL=useInputState.d.ts.map