fdk-share
Deprecation Notice
Vue-based themes will soon be deprecated. Please switch to React-based themes, as all future updates and support will focus exclusively on React.
Share Action Component
Tag
fdk-share
Description
This action displays the shareable QR code and the various social links to share the cart, product or listing with any other person.
Props
Key | Type | Description | Payload |
---|---|---|---|
share_link | string | Store link to be shared. | |
cartShareLink | function | Handler to generate share link on cart page, this returns a link. | UID |
getShareLink | function | Handler to generate share link on product description or listing pages, this returns a link. | URL |
generateQRCode | function | Handler to generate shareable QR code of page URL, this returns a svg image | URL. |
Example
In the following manner you can use this fdk-share action component:
theme/templates/pages/cart-landing.vue
<fdk-share>
<template slot-scope="share">
<div @click="getShareLink(share)">
<fdk-inline-svg :src="'share'"></fdk-inline-svg>
<transition name="fade">
<share
:title="`Spread the shopping delight! Scan QR`"
:share_link="share_link"
/>
</transition>
</div>
</template>
</fdk-share>