whjr-responsive-feedback
v0.0.9
Published
Feedback System
Downloads
3
Readme
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
To use the file simply install the package using command
npm install --save whjr-responsive-feedback
.After installation import the method
feedbackInit
in your file and also import the css file in your component namingwhjr-responsive-feedback.css
.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
Execute the method wherever you need to show the feedback