@livelike/react-native
Version:
LiveLike React Native package
16 lines (13 loc) • 394 B
text/typescript
import { textAskWidgetStore } from '../store';
import { useSelectedFieldStore } from './useSelectedFieldStore';
export type UseTextAskInputTextArg = {
widgetId: string;
};
export function useTextAskInputText({
widgetId,
}: UseTextAskInputTextArg): string | undefined {
return useSelectedFieldStore(
textAskWidgetStore,
() => textAskWidgetStore.get()[widgetId]?.inputText
);
}