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/core
for the component to render and receive data from GroupBy microservices.Prerequisites
This module is meant to be used in a
node
environment which is bundled for use in the browser.Installing
Use
npm
oryarn
to install in anode
project that useswebpack
,browserify
or similar.npm install --save @storefront/infinite-scroll # or yarn add @storefront/infinite-scroll
Usage
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 build
To build an individual package in response to changes within the
src
directory, run the following command:yarn dev
Running tests
To test an individual packages, run the following command:
yarn test
To test an individual package in response to changes within the
src
andtest
directories, run the following command:yarn tdd
Linting
To lint a package, run the following command:
yarn lint
To programmatically fix lint errors within a package, run the following command:
yarn lint:fix
Contributing
Read the contributing file to learn about how to contribute to the StoreFront project.
License
StoreFront and its related packages are MIT licensed.