Socket
Socket
Sign inDemoInstall

@acctglobal/product-container

Package Overview
Dependencies
4
Maintainers
12
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @acctglobal/product-container

```bash yarn add @acctglobal/product-container npm install @acctglobal/product-container ```


Version published
Weekly downloads
4
increased by100%
Maintainers
12
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 12 May 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc