@manufosela/stars-rating
Advanced tools
Comparing version 3.4.1 to 3.4.2
@@ -6,3 +6,3 @@ { | ||
"author": "manufosela", | ||
"version": "3.4.1", | ||
"version": "3.4.2", | ||
"main": "stars-rating.js", | ||
@@ -9,0 +9,0 @@ "module": "stars-rating.js", |
@@ -18,5 +18,12 @@ # \<stars-rating> | ||
<stars-rating></stars-rating> | ||
<stars-rating numstars="8" rating="6"></stars-rating> | ||
``` | ||
## Styling | ||
- **--star-size**. Default 1em | ||
- **--star-color**. Default #FFD700 | ||
- **--star-unicode**. Default'★' | ||
- **--star-reset-unicode**. Default'ø' | ||
## Linting and formatting | ||
@@ -64,3 +71,2 @@ | ||
## Tooling configs | ||
@@ -67,0 +73,0 @@ |
@@ -16,24 +16,24 @@ import { LitElement, html, css } from 'lit'; | ||
_stars: { | ||
type: Array | ||
type: Array, | ||
}, | ||
numstars: { | ||
type: Number, | ||
value: 7 | ||
value: 7, | ||
}, | ||
rating: { | ||
type: Number, | ||
value: 0 | ||
value: 0, | ||
}, | ||
manual: { | ||
type: Boolean, | ||
value: false | ||
value: false, | ||
}, | ||
mode: { | ||
type: String, | ||
value: 'auto' | ||
value: 'auto', | ||
}, | ||
resetbtn: { | ||
type: Boolean, | ||
value: false | ||
} | ||
value: false, | ||
}, | ||
} | ||
@@ -49,2 +49,4 @@ } | ||
--star-color: #FFD700; | ||
--star-unicode: '★'; | ||
--star-reset-unicode: 'ø'; | ||
} | ||
@@ -65,3 +67,3 @@ fieldset, | ||
display: inline-block; | ||
content: var(--start-unicode, "★"); | ||
content: var(--star-unicode, "★"); | ||
} | ||
@@ -83,3 +85,3 @@ label { | ||
display: inline-block; | ||
content: var(--start-unicode, "ø"); | ||
content: var(--star-reset-unicode, "ø"); | ||
opacity:1; | ||
@@ -96,3 +98,3 @@ } | ||
connectedCallback() { | ||
super.connectedCallback(); | ||
if (super.connectedCallback) super.connectedCallback(); | ||
this._updateNumstars(); | ||
@@ -102,3 +104,3 @@ } | ||
disconnectedCallback() { | ||
super.disconnectedCallback(); | ||
if (super.disconnectedCallback) super.disconnectedCallback(); | ||
this.renderRoot.querySelector('#rating').removeEventListener('click', this._rate); | ||
@@ -105,0 +107,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16262
275
83