UNPKG

@hhgtech/hhg-components

Version:
39 lines (38 loc) 1.2 kB
import React, { CSSProperties, ReactNode } from 'react'; import { Props as InputType } from "../../atoms/input"; export type SurveyOption = { label: string; image?: string; value: string; }; export type SurveyTextOption = { label: string; placeholder?: string; inputType?: string; name?: string; isTextArea?: boolean; value?: string; type?: InputType['type']; }; export type SurveyQuestion = { type: 'checkbox' | 'radio' | 'textbox'; title?: ReactNode; subtitle?: ReactNode; image?: string; options?: SurveyOption[]; textOptions?: SurveyTextOption[]; name?: string; multi_select_option?: number | null; is_multi_select?: boolean; from?: number | null; to?: number | null; }; export type Props = { question: SurveyQuestion; description?: string; onOptionsChange?: (c: SurveyOption[]) => void; onTextOptionsChange?: (c: SurveyTextOption[]) => void; className?: string; style?: CSSProperties; }; export declare const SurveyQuestionContent: ({ question, description, onOptionsChange, onTextOptionsChange, style, className, }: Props) => React.JSX.Element;