UNPKG

@readr-media/react-feedback

Version:

## Installation `yarn install`

87 lines 2.14 kB
declare const _default: {}; export default _default; export type NotifyObject = { selectedOption: string | null; optionSummary: { [x: string]: number; }; }; export type Field = { id: string; name: string; status?: string; type: string; sortOrder?: number | null; identifier?: string; }; export type SingleOnly = { thumbUpLabel?: string; thumbDownLabel?: string; options?: Option[]; selectedItem?: string; notifyUpstream?: (data: NotifyObject) => void; }; export type Option = { id?: string; name: string; value: string; iconUrl?: string; }; export type TextOnly = { commentListTitle?: string; defaultText?: string; shouldShowItemControl?: boolean; }; export type SingleField = Field & SingleOnly; export type TextField = Field & TextOnly; export type Form = { id: string; name?: string; type?: string; active?: boolean; fieldsCount?: number; fields: (SingleField | TextField)[]; }; export type ThumbsFieldProps = { thumbsUp: boolean; onMouseDown: () => void; onMouseUp: () => void; checked: boolean; pressing: boolean; label: string; statistic: number; }; export type OptionProps = { label: string; value: string; iconSrc: string; statistic: number; selected: boolean; onMouseUp: () => void; }; export type Comment = { id: string; date: string; content: string; }; export type CommentManager = { comments: Comment[]; noMoreComment: boolean; loadMoreComments: () => Promise<void>; postComment: (value: string) => Promise<void>; }; export type ThumbAmount = { thumbUp: number; thumbDown: number; }; export type ThumbAmountManager = { thumbsUp: ThumbAmount | null; giveThumbUp: (value: boolean | null) => Promise<void>; }; export type OptionAmountManager = { optionSummary: { [x: string]: number; } | null; giveOptions: (defaultOptions: string[], newOptions: string[]) => Promise<void>; }; //# sourceMappingURL=typedef.d.ts.map