1.1.6 • Published 5 years ago

react-casual-quiz v1.1.6

Weekly downloads
26
License
MIT
Repository
github
Last release
5 years ago

react-casual-quiz

A simple quiz react component

Just supply questions, scoring results, and images.

Live demo at https://stevenvictor.net/quizwiz

Usage

npm -i react-casual-quiz

usage - props

import someImportedImage1 from './image1.jpg';
import someImportedImage2 from './image2.jpg';

const title = "What is your personality?";

const results = [
  {
    name: 'type "q" personality...',
    description: 'You are strong, thoughtful, and insightful...',
    image: someImportedImage1,
  },
  {
    name: 'type "z" personality...',
    description: 'You are skilled, zany, and creative...',
    image: someImportedImage2,
  },
];

// Result count must equal choice count, and all questions
// must have the same number of choices.

const questions = [
  {
    question: "What do you like to do for fun?",
    choices: ["video games", "draw"]
  },
];

usage - component

import CasualQuiz from 'react-casual-quiz/lib';

  <CasualQuiz
      title={title}
      results={results}
      questions={questions}
      showSource
    />

https://www.npmjs.com/package/react-casual-quiz

https://github.com/smycynek/react-casual-quiz

See https://github.com/smycynek/quizwiz for full example.

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.13

5 years ago

1.0.11

5 years ago

1.0.12

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago