2.1.12 • Published 7 years ago

fyndiq-component-productlist v2.1.12

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

fyndiq-component-productlist npm

Preview

A Product List component for Fyndiq

Installation

The component can be installed through NPM:

npm i -S fyndiq-component-productlist

Components

The fyndiq-component-productlist exposes 2 components: ProductListItem and a Wrapper. The second one is used to organise several ProductListItem together and manipulate as a list: interactivity, layout...

ProductListItem

Usage

import React from 'react'
import ProductListItem from 'fyndiq-component-productlist'

// Normal usage
<ProductListItem
  title="Product Title"
  price="$239"
  oldPrice="$499"
  category="Product Category"
  brand="Product Brand"
  imageUrl="https://i.imgur.com/BCKlYFQ.jpg"
  rating="4.5"
  shopUrl="https://fyndiq.se/product/12345678"
  uploadDate={new Date(2017, 6, 12)}
/>

API

The component ProductListItem has the following customizable props:

NameTypeDescriptionDefault value
 categoryString Category of the product null
 brandStringBrand of the product  null
 dealTypeStringDeal type of the product. Can be daily or weeklynull 
 imageUrlString URL of the image(required) 
 oldPriceStringStriked price of the productnull 
 priceString Price of the product(required) 
 ratingRating See fyndiq-component-stars's documentation null
 shopUrlString URL of the product on the shopnull 
 titleString Title of the product(required) 
 uploadDateDateDate when the product was uploaded on Fyndiq.null 
 interactiveBoolean If true, the item will react to mouse eventsfalse 
 openBooleanIf true, the item will show a more detailed version of the productfalse 
 showOldPriceBoolean If false, the oldPrice property will not be showntrue 
 showYoursBoolean Show a label Your product next to the titlefalse 
 onClickFunction Handler called when the product has been clicked onnoop => noop 
 additionnalData Array Array of data to show on the information frame, when the ProductListItem is open []

Wrapper

Usage

import React from 'react'
import ProductListItem, { Wrapper } from 'fyndiq-component-productlist'

// Normal usage
<Wrapper>
  <ProductListItem />
  <ProductListItem />
  <ProductListItem />
</Wrapper>

// Allow multiple products to be expanded at the same time
<Wrapper openMultiples>
  <ProductListItem />
  <ProductListItem />
  <ProductListItem />
</Wrapper>

API

The component Wrapper has the following customizable props:

NameTypeDescriptionDefault value
 children NodeThe ProductListItems to display (required)
 openMultiples Boolean If true, the number of products that the user can expand will not be limited to 1 false
2.1.12

7 years ago

2.1.11

8 years ago

2.1.10

8 years ago

2.1.9

8 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.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago