react-sn-question
Installation
npm run install react-sn-question --save
Usage
;;; Component state = questions: questions { const isQuestionCorrect = SNQuestion return <SNQuestion title="An animal cell contains:" resolutionMessage=`The selected value is ` onChange= disable=isQuestionCorrect questions=thisstatequestions /> }
Live demo
API
Prop | Type | Required | Default | Description |
---|---|---|---|---|
title |
string | Yes | The title of the question. | |
resolutionMessage |
string | Yes | Message to be displayed at the bottom of the container which represents the status of the question. | |
questions |
Array | Yes | Contains the questions data. | |
onChange |
function | No | undefined | Fires whenever a button is toggled. |
disable |
boolean | No | false | Disables the SNQuestion. |
Related
Contributing
All contributions are welcome.
License
MIT license @Alvaro Bernal G.