File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed
Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 1+ declare module 'react-quiz-component' {
2+ import { ReactElement } from 'react' ;
3+
4+ type QuestionType = "text" | "photo"
5+
6+ type AnswerSelectionType = "single" | "multiple"
7+
8+ type Question = {
9+ question : string
10+ questionType : QuestionType
11+ answers : string [ ]
12+ correctAnswer : string
13+ answerSelectionType : AnswerSelectionType
14+ messageForCorrectAnswer ?: string
15+ messageForIncorrectAnswer ?: string
16+ explanation ?: string
17+ point ?: string
18+ segment ?: string
19+ }
20+
21+ type QuizStructure = {
22+ quizTitle : string
23+ questions : Question [ ]
24+ }
25+
26+ type QuizProps = {
27+ quiz : QuizStructure ;
28+ disableSynopsis ?: boolean ;
29+ shuffleAnswer ?: boolean ;
30+ shuffle ?: boolean ;
31+ showDefaultResult ?: boolean ;
32+ showInstantFeedback ?: boolean ;
33+ continueTillCorrect ?: boolean ;
34+ timer ?: number ;
35+ allowPauseTimer ?: boolean
36+ }
37+
38+ const Quiz : ( props : QuizProps ) => ReactElement ;
39+ export default Quiz ;
40+ }
Original file line number Diff line number Diff line change 33 "version" : " 0.9.1" ,
44 "description" : " React Quiz Component" ,
55 "main" : " dist/index.js" ,
6+ "types" : " dist/index.d.ts" ,
67 "module" : " dist/index.es.js" ,
78 "scripts" : {
89 "dev" : " webpack-dev-server --mode development" ,
2425 "@babel/plugin-proposal-object-rest-spread" : " ^7.3.2" ,
2526 "@babel/preset-env" : " ^7.3.1" ,
2627 "@babel/preset-react" : " ^7.23.3" ,
27- "@rollup/plugin -babel" : " ^6.0.4" ,
28+ "@rollup/plug -babel" : " ^6.0.4" ,
2829 "@rollup/plugin-commonjs" : " ^28.0.0" ,
2930 "@rollup/plugin-html" : " ^1.0.3" ,
3031 "@rollup/plugin-node-resolve" : " ^15.2.3" ,
You can’t perform that action at this time.
0 commit comments