🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

stars-rating-react-hooks

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stars-rating-react-hooks - npm Package Compare versions

Comparing version

to
0.2.1

2

package.json
{
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",

@@ -4,0 +4,0 @@ "main": "dist/index.js",

@@ -54,18 +54,21 @@ import React, { HtmlHTMLAttributes } from 'react';

const stars: Array<Renderable> = Array.from(Array(totalStars), (_, i: number) => {
const shouldRenderHalf = renderHalf !== null ? true : false;
let sindex = shouldRenderHalf ? i + 0.5 : i + 1;
const stars: Array<Renderable> = Array.from(
Array(totalStars),
(_, i: number) => {
const shouldRenderHalf = renderHalf !== null ? true : false;
let sindex = shouldRenderHalf ? i + 0.5 : i + 1;
const isSelected = sindex <= selectingValue;
const isHalf =
!Number.isInteger(selectingValue) && sindex === selectingValue;
const isSelected = sindex <= selectingValue;
const isHalf =
!Number.isInteger(selectingValue) && sindex === selectingValue;
const render = isSelected
? isHalf
? renderHalf
: renderFull
: renderEmpty;
const render = isSelected
? isHalf
? renderHalf
: renderFull
: renderEmpty;
return render;
});
return render;
}
);

@@ -72,0 +75,0 @@ function getStarProps(index: number, elementProps?: any) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet