Socket
Socket
Sign inDemoInstall

star-rating-component

Package Overview
Dependencies
2
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "star-rating-component",
"version": "1.0.0",
"version": "1.0.1",
"description": "A simple star rating component",

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

@@ -25,3 +25,2 @@ # star-rating

| --------------- | ---------------- | ----------- | --------- | ------- |
| `allowZero` | `allow-zero` | If no stars is allowed | `boolean` | `false` |
| `defaultRating` | `default-rating` | The default rating when the component is loaded | `number` | `3` |

@@ -32,2 +31,4 @@ | `numStars` | `num-stars` | The total number of stars | `number` | `5` |

Component does not allow for zero stars. Good for us, better reviews.
## Events

@@ -45,3 +46,3 @@

```CSS
```
--rating-active-fill-color

@@ -60,4 +61,11 @@ --rating-inactive-fill-color

```html
<star-rating allowZero="false" rounded="true" defaultRating="3" numStars="5" (ratingChange)="ratingChange($event)"></star-rating>
```
<star-rating allowZero="false" rounded="true" defaultRating="3" numStars="5"></star-rating>
.ts
```Typescript
ratingChange(event) {
console.log('New rating: ', event.detail);
}
```

@@ -67,3 +75,3 @@

```
```css
star-rating {

@@ -78,3 +86,2 @@ --rating-active-fill-color: #f5f846;

}
```

@@ -81,0 +88,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc