2.3.1 • Published 7 years ago

star-rating-marko v2.3.1

Weekly downloads
13
License
MIT
Repository
github
Last release
7 years ago

star-rating-marko

star rating component in marko

Usage

Install as a dependency:

npm i star-rating-marko -S

Include the component css. In lasso just include the component as a dependency in your browser.json. Otherwise, reference the css file from star-rating-marko/style.css.

Set the color for both inactive and active stars:

.star-rating-marko__icon {
    color: gray;
}

.star-rating-marko__icon--active:before {
    color: yellow;
}

Invoke the component from your template with a score from 0 to 5. The component will render 5 stars using the html star entity, filled in according to the score rounded to the nearest quarter.

<star-rating-marko score=3.5 />

Example

2.3.1

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.5

7 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago