Quiz widget

Typescript ❤️

A React component that gives a possibility to pass quizzes

Install
yarn add @atlaskit/quiz-widget
Source
Bundle
Changelog
Latest

3.0.1

Patch Changes

  • #120533 f1bec731e278f - Adds a sideEffects field to ensure this package does not have Compiled styles tree-shaken in the future to avoid an accidental regression.

    This is related to https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953


Note: This component is designed for internal Atlassian development.

External contributors will be able to use this component but will not be able to submit issues.

Note: This component is currently in developer preview.

Please experiment with and test this package, but be aware that the API may change at any time. Use at your own risk, preferably not in production.

Usage

import QuizWidget from '@atlaskit/quiz-widget';

Basic

Quiz 1
    Which button do you press?
Next

QuizWidget Props

quizContent object required

Content for the quiz

name string required
questions required
[key: number] string required
answers object required
[key: number] arrayType required Array
string

score union required

Score that is showed after submitting answers

One of
number,
null

correctAnswers union

Correct answers for the particular quiz

One of
[key: number] string required
,
null

onSubmitButtonClick function

Function to be executed when the submit button is pressed

choosenAnswers => undefined

onNextButtonClick function

Function to be executed when the next button is clicked

() => undefined