whjr-responsive-feedback

0.0.9 • Public • Published

whjr-responsive-feedback

This library shows a popup animation and maintain user streak to show the animation

Below are the steps for how to install and use this package

  1. To use the file simply install the package using command npm install --save whjr-responsive-feedback.

  2. After installation import the method feedbackInit in your file and also import the css file in your component naming whjr-responsive-feedback.css.

  3. The feedbackInit method requires an object with following paramenters

     headerKey (optional) : key to find the heder in the object passed // string
     modalWidth (optional) : width of modal // string
     titleKey (optional) :  key to find the title in the object passed//string
     subtitleKey (optional) : key to find the subtitle in the object passed  //string
     isTitleSubtitleJoin (optional) : boolean value to know if title and subtitle are in the same key // boolean
     elementType (manadatory) : Element Type which is being shown in the  feedback (e.g. video, audio etc) // string
     srcKey (manadatory) : key to find the src in the object passed // string
     srcType (manadatory) : source type (mp3, video/mp4 etc) // string
     videoLengthKey (manadatory) : key to find the src in the object passed in seconds // number
     closeCallFunc (optional) : function to execute during closing of modal // function,
     characterReactionsConfig (manadatory) : object where we need to find above values // object
     isCorrectAttempted (manadatory) : boolean value to find the current question answer to create the streak // boolean
     questionIndex (manadatory) : user current question start with 1// number
    
  4. Execute the method wherever you need to show the feedback

Readme

Keywords

none

Package Sidebar

Install

npm i whjr-responsive-feedback

Weekly Downloads

0

Version

0.0.9

License

none

Unpacked Size

9.5 kB

Total Files

4

Last publish

Collaborators

  • anubhavraj