2.2.0 • Published 7 years ago

fyndiq-component-stars v2.2.0

Weekly downloads
86
License
-
Repository
github
Last release
7 years ago

fyndiq-component-stars npm

Preview

A rating stars component for Fyndiq

Installation

The component can be installed through NPM:

npm i -S fyndiq-component-stars

Usage

import React from 'react'
import Stars from 'fyndiq-component-stars'

// Normal usage
<Stars rating={4} />

// Different size
<Stars rating={3.5} size="l" />

// Show number of reviews
<Stars rating={4} reviews={53} />

// Interactive version
<Stars interactive onChange={handleChange} />

API

The component Stars has the following customizable props:

NameTypeDescriptionDefault value
ratingNumber or StringThe current rating of the product (between 0 and 5). Can be decimal undefined
reviewsNumberNumber of reviews undefined
sizeStringCan be l for a bigger component m
interactiveBooleanEnables interactive modefalse
onChangeFunctionThe handler when used in interactive mode. noop => noop 
2.2.0

7 years ago

2.1.9

7 years ago

2.1.8

8 years ago

2.1.7

8 years ago

2.1.6

8 years ago

2.1.5

8 years ago

2.1.4

8 years ago

2.1.3

8 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.1-0

8 years ago

2.0.0

8 years ago

1.2.1

8 years ago

2.0.0-pre.0

8 years ago

1.2.0

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.5

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago