Gift cards SDK reference

Gift-card display and shopper actions.

Import these public values from @upstorr/theme-sdk/v1. Do not import their internal source files.

createThemeGiftCardView

createThemeGiftCardView(data: unknown, currentCurrency: string): ThemeGiftCardView

ThemeGiftCardView

type ThemeGiftCardView = {
    balanceLabel: string;
    code: string;
    error: string | null;
};

useThemeGiftCardCodeCopy

useThemeGiftCardCodeCopy(code: string): { readonly message: string | null; readonly copy: () => Promise<void>; }