https://github.com/blocto/quiz
Quiz component for Blocto blockchain guide
https://github.com/blocto/quiz
Last synced: 4 months ago
JSON representation
Quiz component for Blocto blockchain guide
- Host: GitHub
- URL: https://github.com/blocto/quiz
- Owner: blocto
- Created: 2020-05-22T08:38:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T06:39:50.000Z (over 2 years ago)
- Last Synced: 2025-02-13T01:16:10.642Z (4 months ago)
- Language: JavaScript
- Size: 576 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Quiz Component [](https://www.npmjs.com/package/@portto/quix)
Quiz component for blockchain guide## Setup
Add `@portto/quiz` to your react project through `yarn` or `npm`
```sh
# Install through yarn, recommended
yarn add @portto/quiz# or install through npm
npm install @portto/quiz --save
```Then in your project you can use it like
```javascript
import React from 'react';
import Quiz from '@portto/quiz';
import { fromJS } from 'immutable';const SampleReward = () => {
const [isQuizActive, setQuizActive] = useState(false)const stopQuiz = () => {
setQuizActive(false);
};
const completeQuiz = () => {
// Send reward
setQuizActive(false);
};return (
Claim your rewards now.',
submit: 'Submit',
}}
/>
);
}export default SampleReward;
```