@anoki/fse-common
Version:
Common types for FSE
26 lines (25 loc) • 619 B
TypeScript
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;
};