Variables
Const BREAKPOINT_ITEM_HEIGHT
BREAKPOINT_ITEM_HEIGHT: 0.25 = 0.25
Const BREAKPOINT_SCROLL_DOWN
BREAKPOINT_SCROLL_DOWN: 0.75 = 0.75
Const BREAKPOINT_SCROLL_UP
BREAKPOINT_SCROLL_UP: 1.25 = 1.25
Const LOADLABEL
LOADLABEL: "loading..." = "loading..."
Const PADDING
PADDING: 20 = 20
Const SCROLL_OFFSET
SCROLL_OFFSET: 50 = 50
StoreFront infinite-scroll
StoreFront
<gb-infinite-scroll>componentGetting Started
This module requires
@storefront/corefor the component to render and receive data from GroupBy microservices.Prerequisites
This module is meant to be used in a
nodeenvironment which is bundled for use in the browser.Installing
Use
npmoryarnto install in anodeproject that useswebpack,browserifyor similar.npm install --save @storefront/infinite-scroll # or yarn add @storefront/infinite-scrollUsage
This module provides the
<gb-infinite-scroll>component for use with StoreFront.Mount tag
<!-- index.html --> <body> <gb-infinite-scroll></gb-infinite-scroll> </body>// index.js storefront.mount('gb-infinite-scroll');Building the package
To build an individual package, run the following command:
yarn buildTo build an individual package in response to changes within the
srcdirectory, run the following command:yarn devRunning tests
To test an individual packages, run the following command:
yarn testTo test an individual package in response to changes within the
srcandtestdirectories, run the following command:yarn tddLinting
To lint a package, run the following command:
yarn lintTo programmatically fix lint errors within a package, run the following command:
yarn lint:fixContributing
Read the contributing file to learn about how to contribute to the StoreFront project.
License
StoreFront and its related packages are MIT licensed.