@ernane/svelte-star-rating
Advanced tools
Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "@ernane/svelte-star-rating", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Simple component to assign scores based on stars.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -41,8 +41,9 @@ <h1 align="center"> | ||
| Attribute | Data Type | Required | Default | | ||
|:---------:|:------------:|:---------:|:------------:| | ||
| readOnly | `bool` | false | false | | ||
| countStars| `integer` | false | 5 | | ||
| score | `float` | false | 0.0 | | ||
| showScore | `bool` | false | true | | ||
| Attribute | Data Type | Required | Default | | ||
|:----------:|:------------:|:-----------:|:------------:| | ||
| readOnly | `bool` | false | false | | ||
| countStars | `integer` | false | 5 | | ||
| score | `float` | false | 0.0 | | ||
| showScore | `bool` | false | true | | ||
| scoreFormat| `function` | false | precent | | ||
@@ -82,2 +83,3 @@ In addition, we have two other nested attributes that specify distinct settings. | ||
showScore: true, | ||
scoreFormat: function(){ return `(${this.score.toFixed(0)}/${this.countStars})` }, | ||
starConfig: { | ||
@@ -106,3 +108,3 @@ size: 30, | ||
```js | ||
import StarRatting from "@ernane/svelte-star-rating"; | ||
import StarRating from "@ernane/svelte-star-rating"; | ||
``` | ||
@@ -120,3 +122,3 @@ | ||
```js | ||
<StarRatting {config}/> | ||
<StarRating {config}/> | ||
``` | ||
@@ -130,2 +132,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
63507
9
129