UNPKG

@anoki/fse-common

Version:

Common types for FSE

29 lines (25 loc) 561 B
import { SendAnswer } from './feedback' export type Answer = { id: string answer: string } export type Question = { id: string question: string answers: Array<Answer> type: 'CLOSE' | 'OPEN' } export type QuestionsProps = { questions: Array<Question> onChangeAnswer: (questionId: string, answer: Answer) => void handleOpenAnswer: (s: string) => void onSend: () => void values: Array<SendAnswer> openAnswer: string buttons: { next: string previous: string } maxCharactersMessage?: string openAnswerPlaceholder: string }