1.0.0 • Published 2 years ago

@hadeel-mahmoud/react-interactive-rating-widget v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Introduction

React rating component that consists of a rating card which allows the user to enter a rating number between 1 and 5 then displays a thank you card once the user has submitted their rating. All the styling and card contents are customizable.

Rating View Thank You View

Installation

npm i @hadeel-mahmoud/react-interactive-rating-widget

Usage

import RatingView from "@hadeel-mahmoud/react-interactive-rating-widget";

<RatingView />;

Properties

PropertyTypeDescription
containerStyleObjectStyle of overall wrapper
ratingViewImageImageThe image that will appear in the rating view
ratingViewHeaderTextTextThe header text of rating view
ratingViewBodyTextTextThe body text content of rating view
ratingViewSubmitButtonTextTextThe submit button text
ratingViewImageContainerStyleObjectThe circular image container style
ratingViewImageStyleObjectThe style of the image in rating view
ratingViewHeaderStyleObjectThe style of header text in rating view
ratingViewDescriptionStyleObjectThe style of description text in rating view
ratingViewSubmitButtonStyleObjectThe style of submit button
ratingViewNumberContainerStyleObjectThe style of rating numbers container
ratingViewNumberStyleObjectThe style of the rating numbers. Note that in order to edit the style of the number of hover use the following syntax in the object : "--hover-color": "black","--hover-background-color": "pink",
ratingViewSelectedNumberStyleObjectThe style of the selected rating value
thankYouViewImageImageThe image that will appear in the thank you view
thankYouTextTextThe thank you text that will appear.
thankYouViewRatingResultTextTextThe thank you view rating result text should contain the following syntax so that the value selected by the user will be modified on your inserted text: "You selected {value} out of 5"
thankYouViewDescriptionTextTextThe body text of thank you view
thankYouViewImageStyleObjectThe style of the thank you image
thankYouViewRatingResultTextStyleObjectThe style of the rating result text
thankYouViewHeaderStyleObjectThe style of thank you view header
thankYouViewDescriptionTextStyleObjectThe style of the thank you view body text
1.0.0

2 years ago