0.1.7 • Published 2 years ago

@acctglobal/product-container v0.1.7

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Installation

yarn add @acctglobal/product-container
npm install @acctglobal/product-container
import { ProductContainer } from '@acctglobal/product-container'

TimedProductContainer

TimedProductContainer is a product rendering component that receives a start and an end date to calculates the time from the current date to the end date to render products until the last second

image

Configuration

  1. Add import from component
import ProductContainer from "./components/TimedProductContainer/index";
  1. Now call Timed Product Container in code and pass required props
<ProductContainer
        timer={true}
        productsData={productsData}
        startDate={new Date("Year-Month-DayTHour:Minutes:Seconds")}
        endDate={new Date("Year-Month-DayTHour:Minutes:Seconds")}
/>
Prop nameTypeDescription
productsDataobjectThe data of the products tha will be used
startDateDateThe date that product container will start to render
endDateDateThe date that produc container will stop to render
timerbooleanIf passed as false will render the product container without a timer
starImgstringPass a image url to change star icon
starAltstringPass a string to change star image alt
shelfCustomStyleobjectAccept styles to change product shelf
offerCustomStyleobjectAccept styles to change offer style
productImageStyleobjectAccept styles to change product image
productNameStyleobjectAccept styles to change product name
ratingContainerStyleobjectAccept styles to change rating container
starRatingStyleobjectAccept styles to change rating stars
oldPriceStyleobjectAccept styles to change old price
priceStyleobjectAccept styles to change price
installmentsStyleobjectAccept styles to change installments
timerStyleobjectAccept styles to change timer
  • shelfCustomStyle object
Prop nameTypeDescription
widthstringChange the width of product shelf
marginstringChange the margin of product shelf
borderRadiusstringChange border radius of product shelf
borderstringChange border of product shelf
  • offerCustomStyle object
Prop nameTypeDescription
backgroundColorstringChange the background color of the offer
fontSizestringChange the font size os the offer
fontWeightstringChange the font weight os the offer
borderRadiusstringChange border radius of the offer
colorstringChange the color of the offer
widthstringChange the width of the offer
heightstringChange the height of the offer
topstringPosition the offer from the top
rightstringPosition the offer from the right
bottomstringPosition the offer from the bottom
leftstringPosition the offer from the left
  • productImageStyle object
Prop nameTypeDescription
widthstringChange the width of product image
heightstringChange the margin of product image
borderRadiusstringChange border radius of product image
  • productNameStyle object
Prop nameTypeDescription
fontSizestringChange the font size of product name
fontWeightstringChange the font weight of product name
  • ratingContainerStyle object
Prop nameTypeDescription
widthstringChange the width of rating container
justifyContentstringChange the justify method of rating container
  • starRatingStyle object
Prop nameTypeDescription
widthstringChange the width of star rating
heightstringChange the height of star rating
marginstringChange the margin of star rating
  • oldPriceStyle object
Prop nameTypeDescription
fontSizestringChange the old price font size
fontWeightstringChange the old price font weight
textDecorationstringChange the old price text decoration
marginstringChange the old price margin
  • priceStyle object
Prop nameTypeDescription
fontSizestringChange the price font size
fontWeightstringChange the price font weight
textDecorationstringChange the price text decoration
marginstringChange the price margin
  • installmentsStyle object
Prop nameTypeDescription
fontSizestringChange the installments font size
fontWeightstringChange the installments font weight
textDecorationstringChange the installments text decoration
marginstringChange the installments margin
0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago