react-feedback-star-component
v1.0.6
Published
There are feedback start component for React
Downloads
1
Maintainers
Readme
React-Feedback-Star-Component
Feedback start component is a useful component for all users who need to have an opinion from users. The component is simple and intuitive and adaptable in any site , also great for its simplicity in editing.
Installation
npm i react-feedback-star-component
Demo
Import
import Feedbackstar from "react-feedback-star-component";
Usage
Using this component is very simple ,Once installed you can associate a function of your choice to the click of each star that will have a value from 1 to 5 depending on the vote.
<FeedbackStar sendFeedback={vote => console.log(vote)} />
Options
| Options | Type | Default | Description | | ------------------------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------- | | fontSizeStar | String | 5vw | Allows you to change the size of stars | | colorStar | String | #FFD700 | Allows you to change the color of the stars | | titleArray | String | "Awesome - 5 stars","Pretty good - 4 stars", "Meh - 3 stars","Kinda bad - 2 stars","Sucks big time - 1 star" | Allows you to change the title of the stars | | sendFeedback | Function | undefined | Function associated when clicking on a star |