Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoking onRestart #6

Open
pmirla opened this issue Mar 23, 2022 · 1 comment
Open

Invoking onRestart #6

pmirla opened this issue Mar 23, 2022 · 1 comment

Comments

@pmirla
Copy link

pmirla commented Mar 23, 2022

hello Avi
I want to know how to invoke onRestart.
Label : #3 "help wanted"

I am trying a scenario. where there is only one question and 4 answer choices are given.
On incorrect answer, I will show text based from revealResponse prop

Any suggestions please?

Here is an example.

         question: <h1>  Here is some adjacent image text <YouTube videoId="-EQO6YMIzqg" opts={opts}/></h1>,
         questionRelativeToImage: "adjacent",
         fontColor: "gray",
         answerArrangement: "row",
         backgroundImageSrc: "https://storage.googleapis.com/chapters-ifm/testfolder/2022/delta_3d_2022.gif",
         answers: [
           {
             answer: "Answer one",
             resultID: 0,
                  revealResponse: {
                   title: (
                     <>
                       <h3 className="rbq_question_response_title">
                         Wrong answer!
                       </h3>
                        <button onClick={onRestart}> Retake </button>  <<<<HELP HERE PLEASE. This does not work>>>
                     </>
                   ),
                   description:
                     "Trigger your own answer response by setting an answer's revealResponse key. You can set a title and description value (either of which can be a string or a JSX element). You can also set an image and an image attribution statement.",
                  },
           },```
@pmirla
Copy link
Author

pmirla commented Mar 23, 2022

I see that retake shows up when all the questions are answered. Which is perfect. But I'd like to see only the retake button and hide every other elements in results . Possible Avi?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant