Catalog
The Catalog allows learners to search and browse for content.
Installation
npm install @thoughtindustries/catalog
Props
CatalogProvider
| Name | Required | Type | Description |
|---|---|---|---|
config | Yes | CatalogProviderConfig | Config object controlling various aspects of the Catalog |
Catalog
| Name | Required | Type | Description |
|---|---|---|---|
onAddedToQueue | Yes | function | Handles "Add to Queue" button clicks |
priceFormat | No | function | Custom price display formatting |
Examples
With Search Params and Custom Pagination
import { Catalog, CatalogProvider } from '@thoughtindustries/catalog';
const config = {
parsedUrl: {
pathname: '/catalog',
searchString: '?query=test'
}
}
<CatalogProvider config={config}>
<Catalog
onAddedToQueue={(item) => Promise.resolve()}
pagination={({page, pageSize, total, getPageLink}) => <>...</>} />
</CatalogProvider>