Nondeterministic Postrequisite Metaprotocol

npm

Need private packages and team management tools?Check out npm Orgs. »

@advanced-rest-client/star-rating

1.0.0 • Public • Published

Published on NPM

Build Status

Published on webcomponents.org

<star-rating>

A component that renders stars for rating.

<star-rating value="3"></star-rating>
<star-rating value="4" readonly></star-rating>

Element can be styled using CSS variables

<star-rating class="theme-blue" value="3"></star-rating>
<style>
.theme-blue {
  --star-rating-unselected-color: #BBDEFB;
  --star-rating-selected-color: #1565C0;
  --star-rating-active-color: #2196F3;
}
</style> 

API components

This components is a part of API components ecosystem

Usage

Installation

npm install --save @advanced-rest-client/star-rating

In an html file

<html>
  <head>
    <script type="module">
      import './node_odules/@advanced-rest-client/star-rating/star-rating.js';
    </script> 
  </head>
  <body>
    <star-rating value="2"></star-rating>
  </body>
</html>

In a Polymer 3 element

import {PolymerElement, html} from './node_odules/@polymer/polymer';
import './node_odules/@advanced-rest-client/star-rating/star-rating.js';
 
class SampleElement extends PolymerElement {
  static get template() {
    return html`
    <star-rating value="2"></star-rating>
    `;
  }
}
customElements.define('sample-element', SampleElement);

Installation

git clone https://github.com/advanced-rest-client/star-rating
cd api-url-editor
npm install
npm install -g polymer-cli

Running the demo locally

polymer serve --npm
open http://127.0.0.1:<port>/demo/

Running the tests

polymer test --npm

install

npm i @advanced-rest-client/star-rating

Downloadsweekly downloads

5

version

1.0.0

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability