1.1.6 • Published 4 years ago
react-casual-quiz v1.1.6
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
4 years ago
1.1.5
4 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.1.0
4 years ago
1.0.18
4 years ago
1.0.17
4 years ago
1.0.16
4 years ago
1.0.15
4 years ago
1.0.13
4 years ago
1.0.11
4 years ago
1.0.12
4 years ago
1.0.10
4 years ago
1.0.9
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago