production-nps-popup-library
TypeScript icon, indicating that this package has built-in type declarations

0.0.77 • Public • Published

Net Promoter Score

production-nps-popup-library project is the frontend popup for capturing user's feedback and scores for your product. We have used typescript , react and ant design to create a library which can we used as the component in your project.. Please Follow this quick guide for how to use and setup the project.

Objective

The objectives of the project is to provide a react component which can be included in the project and we can capture user's score and comments easily.

Installing

  • NPM Install
npm install production-nps-popup-library

Example

  • Import in page
import {NPSPopup} from 'production-nps-popup-library';
This can be used for the projects using Ant-Design as styling framework.

import {NPSPopupModal} from 'production-nps-popup-library';

This can be used for the projects not using Ant-Design. It is developed using simple styles
  • Passing Props to the library
  <NPSPopup 
  title= 'Net Promoter Score' // NPS title
  onSubmit={onSubmit} // submit method
  scoreSuccessText={"Thank you for the score !!"} //Success message after score is submitted.
  lowScoreText={"Not likely to recommend"}//Text for display low score label.
  highScoreText={"Extremely likely to recommend"}//Text for display high score label.
  scoreTitle={"How likely would you recommend product to your colleagues ?"}//Title for the score icon in the popup.
  commentsTitle={"Any Other Feedback ?"} /Title for the comments label.
  submitBtnText={"Submit"}//Text for the submit button.
/>

or

  <NPSPopupModal 
  title= 'Net Promoter Score' // NPS title
  onSubmit={onSubmit} // submit method
  scoreSuccessText={"Thank you for the score !!"} //Success message after score is submitted.
  lowScoreText={"Not likely to recommend"}//Text for display low score label.
  highScoreText={"Extremely likely to recommend"}//Text for display high score label.
  scoreTitle={"How likely would you recommend product to your colleagues ?"}//Title for the score icon in the popup.
  commentsTitle={"Any Other Feedback ?"} /Title for the comments label.
  submitBtnText={"Submit"}//Text for the submit button.
/>
  • Submit method
const onSubmit = (score,comments) => {
   console.log(score,comments)
  };

1. score provided by the user
2. comments provided by the user 

Dependents (0)

Package Sidebar

Install

npm i production-nps-popup-library

Weekly Downloads

75

Version

0.0.77

License

ISC

Unpacked Size

251 kB

Total Files

11

Last publish

Collaborators

  • chendyrewa