1.0.2 • Published 5 years ago
@rei/cdr-rating v1.0.2
CdrRating
For the most up-to-date information, see REI Cedar documentation.
Props
name | type | default |
---|---|---|
rating | number | 0 |
Sets the rating values between 0 and 5. Required. |
name | type | default |
---|---|---|
count | number | 0 |
Displays the total number of reviews. |
name | type | default |
---|---|---|
compact | boolean | false |
Hides the word 'Reviews' if true. |
name | type | default |
---|---|---|
href | string | n/a |
Sets the rating component (icons and text) to display inline and wraps them in an anchor tag. |
name | type | default | ||
---|---|---|---|---|
size | string | 'medium' | ||
Modifies the style variant for this component. Possible values: { ‘small’ | ‘medium’ | ‘large’ } |
Installation
Resources are available within the CdrRating package:
- Component:
@rei/cdr-rating
- Component styles:
cdr-rating.css
To incorporate the required assets for a component, use the following steps:
1. Install using NPM
Install the CdrRating package using npm
in your terminal:
Terminal
npm i @rei/cdr-rating
2. Import dependencies
main.js
// import your required CSS.
import "@rei/cdr-rating/dist/cdr-rating.css";
3. Add component to a template
local.vue
<template>
...
<cdr-rating rating="4.2" count="77" />
...
</template>
<script>
import { CdrRating } from '@rei/cdr-rating;
export default {
...
components: {
CdrRating
}
}
</script>
Usage
By default the CdrRating component renders the icons in medium size (24px) with the total number of reviews.
Rating Values
1.0.2
5 years ago
1.0.2-alpha.0
5 years ago
1.0.1
5 years ago
1.0.0
6 years ago
1.0.0-alpha.4
6 years ago
1.0.0-alpha.3
6 years ago
1.0.0-alpha.2
6 years ago
1.0.0-alpha.1
6 years ago
1.0.0-alpha.0
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago
0.0.1
6 years ago