UNPKG

@fremtind/jkl-feedback-react

Version:
14 lines (13 loc) 599 B
import { SetStateAction, Dispatch, FormEventHandler } from "react"; import { FeedbackType, FeedbackOption } from "../types"; type Value = FeedbackOption<string | number> | FeedbackOption<string | number>[] | undefined; type MainQuestion = { currentValue: Value; setCurrentValue: Dispatch<SetStateAction<Value>>; message: string | undefined; setMessage: Dispatch<SetStateAction<string | undefined>>; submitted: boolean; handleSubmit: FormEventHandler<HTMLFormElement>; }; export declare const useMainQuestion: (onSubmit: (f: FeedbackType) => void) => MainQuestion; export {};