Socket
Socket
Sign inDemoInstall

@ernane/svelte-star-rating

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ernane/svelte-star-rating - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

.github/FUNDING.yml

2

package.json
{
"name": "@ernane/svelte-star-rating",
"version": "1.1.0",
"version": "1.1.1",
"description": "Simple component to assign scores based on stars.",

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

@@ -14,3 +14,3 @@ <h1 align="center">

<p align="center">
<img alt="preview star rating" src="https://raw.githubusercontent.com/ErnaneJ/svelte-star-rating/master/.github/preview.png" width="90%">
<img alt="preview star rating" src="https://raw.githubusercontent.com/ErnaneJ/svelte-star-rating/master/.github/preview.png" width="50%">
</p>

@@ -44,6 +44,6 @@

|:---------:|:------------:|:---------:|:------------:|
| readOnly | `bool` | não | false |
| countStars| `integer` | não | 5 |
| score | `float` | não | 0.0 |
| showScore | `bool` | não | true |
| readOnly | `bool` | false | false |
| countStars| `integer` | false | 5 |
| score | `float` | false | 0.0 |
| showScore | `bool` | false | true |

@@ -56,13 +56,15 @@ In addition, we have two other nested attributes that specify distinct settings.

|:----------:|:------------:|:---------:|:------------:|
| min | `integer` | não | 0 |
| max | `integer` | não | 5 |
| step | `float` | não | 0.001 |
| min | `integer` | false | 0 |
| max | `integer` | false | 5 |
| step | `float` | false | 0.001 |
- ⭐ Setting of the Stars:
| Attribute | Data Type | Required | Default |
|:-----------:|:------------:|:---------:|:------------:|
| size | `integer` | não | 30 |
| fillColor | `String` | não | #F9ED4F |
| strokeColor | `String` | não | #BB8511 |
| Attribute | Data Type | Required | Default |
|:-------------------:|:------------:|:-----------:|:------------:|
| size | `integer` | false | 30 |
| fillColor | `String` | false | #F9ED4F |
| strokeColor | `String` | false | #BB8511 |
| unfilledColor | `String` | false | #FFF |
| strokeUnfilledColor | `String` | false | #000 |

@@ -85,3 +87,5 @@ In the end, the configuration object will be similar to the one shown below.

fillColor: '#F9ED4F',
strokeColor: "#BB8511"
strokeColor: "#BB8511",
unfilledColor: '#FFF',
strokeUnfilledColor: '#000'
}

@@ -91,2 +95,10 @@ }

- 🎯 Events
In addition, it is also possible to observe events of the component itself that will be executed in an internal element from a defined action. Below are the available events.
| Type | Target | Required | Default |
|:-------------------:|:-----------------:|:-----------:|:------------:|
| change | `input.slider` | false | null |
## 💡 Use

@@ -97,3 +109,3 @@

```js
import StarRatting from "@ernane/svelte-star-rating";
import StarRating from "@ernane/svelte-star-rating";
```

@@ -111,3 +123,3 @@

```js
<StarRatting {config}/>
<StarRating {config}/>
```

@@ -121,2 +133,2 @@

Developed with ❤ by <a target="_blank" href="https://links.ernane.dev/">Ernane Ferreira</a>. 👋🏻
</div>
</div>

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc