0.3.0 • Published 6 years ago

react-nps v0.3.0

Weekly downloads
155
License
MIT
Repository
github
Last release
6 years ago

React NPS

npm (scoped) npm (scoped)

Install

$ npm install react-nps

or

$ yarn add react-nps

Usage

import NPS from "react-nps";

Then in your render :

onClose = (event) => {
  event.preventDefault();

  this.setState({ open: false });
}

...

<NPS onClose={this.onClose} onSubmit={this.onSubmit} open={this.state.open} />

Available props

  • animated: boolean default true: whether the panel is animated or not
  • animationDuration: number default 2: duration of the animation in second - works only if animated is true
  • message: string: message displayed on the NPS component
  • onClose: function: called when clicked on the close button or when a score is submitted
  • onSubmit: function: function called when a score is submitted
  • open: boolean default true: whether the panel is open or not
  • style: object: the button style, possible keys are: backgroundColor, backgroundActiveColor, textColor, and textActiveColor
0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago