@visma-digital-commerce/pwa-tag-list
v1.0.1
Published
A tag list extension for a PWA Studio storefront
Downloads
2
Keywords
Readme
Visma Digital Commerce: Module Name
Module responsible for category tag list for a product.
Functionality
Adds a list of buttons with links to category that a given product is a part of.
Implementing
Add it to ProductFullDetail component. Example implementation using targetables:
const interceptComponent = component => {
const ProductDetails = component;
// Add an import statement to the productFullDetail.js file and
// return the SingleImportStatement object
const TagList = ProductDetails.addImport("TagList from 'tagList'");
// Insert the TagList component after the product description and pass in the
// new categoriesListData object added to the useProductFullDetails() hook
ProductDetails.insertAfterJSX(
'<RichContent html={productDetails.description} />',
`<${TagList} categoriesListData={productDetails.categoriesListData} />`
);
};
exports.interceptComponent = interceptComponent;
License
This module is proprietary software belonging to Visma Digital Commerce AS.