@ernane/svelte-star-rating
Advanced tools
Comparing version 1.1.0 to 1.1.2
{ | ||
"name": "@ernane/svelte-star-rating", | ||
"version": "1.1.0", | ||
"version": "1.1.2", | ||
"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 | ||
@@ -93,0 +105,0 @@ |
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
62544
126