-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated storybook, split main component into more meaningful components #9
Conversation
src/rating-average/RatingAverage.tsx
Outdated
const RatingAverage: FC<IRatingAverageProp> = (props) => { | ||
const { | ||
ratings, | ||
customAverageFn, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we have customAverageFn = getWeightedAverage
and remove computeAverage
?
README.md
Outdated
averageRatingPrecision={2} | ||
ratingAverageIconProps={{ | ||
fillColor: 'green', | ||
bgColor: 'red' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the code part correctly formatted?
src/rating-summary/RatingSummary.tsx
Outdated
if (getElementStyle) return getElementStyle(ratingId); | ||
return {}; | ||
const getRatingRanks = (): RatingRanks => { | ||
if (Object.keys(ratingRanks).length) return { ...ratingRanks }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this spread has no here since this is used as prop
src/rating-summary/RatingSummary.tsx
Outdated
)} | ||
<div | ||
className={classes.ratingsWrapper} | ||
style={{ ...styles[GenericElements.SummaryContainer] }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this spread can be avoided
src/rating-average/RatingAverage.tsx
Outdated
className={classes.starImage} | ||
style={{ ...styles[GenericElements.AverageStarIcon] }} | ||
> | ||
<PartiallyFilledStar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename the component to match with the functionality
…d operator, updated storybook, renamed a component
* added search keyvwords for npm * Updated storybook, split main component into more meaningful components (#9) * Updated storybook, split main jsx into more meaningful components * Added average rating section * Added more style customisation options * style corrections and more style customisation options added * Added support for string rating-ids, refactored code * updated testcases * Updated readMe and storybook * Rating rank logic adjusted * updated storybook * Added support to customize un-filled bar in the summary chart section * made summary labels take width of longest item, making it into table style * updated readMe and corrected indentation. * updating storybook template * update .gitignore * PR comment fixes - Optimize code by removing unnecessary object spread operator, updated storybook, renamed a component * PR comment fixes - renamed some props, updated readMe with more detailed information * updated code-sandbox link with the one created in keyvalue workspace * fixed issue: inner progress bar overflowing the outer container * updated email in code_of_conduct.md file * Added pull-request and style templates to the repo * update release version in package.json * fix:make description of prop ratingRanks simpler * revert version bump --------- Co-authored-by: GokulSNath <[email protected]>
No description provided.