0.0.4 • Published 11 months ago

custom-atomic-add-to-cart v0.0.4

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
11 months ago

Add to cart

Props

NameTypeDescription
callback-functionstringName of callback function to be called when add to cart button is clicked

This component provides a button with a callback function that needs to be edited to contain logic as to how to add the item to a cart. This component can be placed in one of the tags inside of the <atomic-result-template> tag. The logic for the add to cart component can be placed inside of a script tag in the html document.

<script >
    window.addToCartCallback = function () {
        console.log('add your add to cart logic here');
    }
</script>
<atomic-result-section-title>
    <add-to-cart callback-function="addToCartCallback"></add-to-cart>
</atomic-result-section-title>

Built With Stencil