Skip to content

ButtonShareProps

ButtonShareProps = { classname?: string; clickAction?: "embedded-wallet" | "sharing-page"; noRewardText?: string; placement?: string; preview?: string; targetInteraction?: InteractionTypeKey; text?: string; }

Defined in: vendor/wallet/sdk/components/src/components/ButtonShare/types.ts:7

The props type for ButtonShare.

optional classname?: string

Defined in: vendor/wallet/sdk/components/src/components/ButtonShare/types.ts:25

Classname to apply to the button


optional clickAction?: "embedded-wallet" | "sharing-page"

Defined in: vendor/wallet/sdk/components/src/components/ButtonShare/types.ts:44

Which UI to open on click.

Legacy values (e.g. "share-modal") are accepted at runtime and gracefully route to the full-page sharing UI — the modal-flow share path was retired in favour of displaySharingPage.

"sharing-page"


optional noRewardText?: string

Defined in: vendor/wallet/sdk/components/src/components/ButtonShare/types.ts:30

Fallback text when text contains the {REWARD} placeholder but no reward is available.


optional placement?: string

Defined in: vendor/wallet/sdk/components/src/components/ButtonShare/types.ts:8


optional preview?: string

Defined in: vendor/wallet/sdk/components/src/components/ButtonShare/types.ts:51

When set, renders the button in preview mode (e.g. Shopify/WP editor). Skips the client-ready gating so the button is always enabled visually, and no-ops the click handler so merchants can see the final layout with their configured copy even when no Frak client is initialized.


optional targetInteraction?: InteractionTypeKey

Defined in: vendor/wallet/sdk/components/src/components/ButtonShare/types.ts:34

Target interaction behind this sharing action (will be used to get the right reward to display)


optional text?: string

Defined in: vendor/wallet/sdk/components/src/components/ButtonShare/types.ts:21

Text to display on the button.

Including the placeholder {REWARD} (e.g. Share and earn up to \{REWARD\}!) opts the button into the live reward flow: the SDK fetches the estimated reward and substitutes the placeholder. When no reward is available, noRewardText is used as a fallback (or the placeholder is stripped if no fallback is provided).

When omitted, a built-in localized default is used based on the resolved language ("Share and earn!" / "Partagez et gagnez !").