custom-atomic-add-to-cart
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Add to cart

Props

Name Type Description
callback-function string Name 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

Package Sidebar

Install

npm i custom-atomic-add-to-cart

Weekly Downloads

19

Version

0.0.4

License

Apache-2.0

Unpacked Size

1.51 MB

Total Files

40

Last publish

Collaborators

  • jantoun_coveo