How to use the shopify-buy/dist/shopify-buy.umd.polyfilled.UI function in shopify-buy

To help you get started, we’ve selected a few shopify-buy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Shopify / buy-button-js / src / shopify-buy-ui.js View on Github external
import ShopifyBuy from 'shopify-buy/dist/shopify-buy.umd.polyfilled';
import UI from './ui';
import productTemplates from './templates/product';

ShopifyBuy.UI = {
  ui: null,

  init(client, integrations = {}, styleOverrides) {
    if (!this.ui) {
      this.ui = new UI(client, integrations, styleOverrides);
    }
    return this.ui;
  },

  adapterHelpers: {
    templates: {
      product: productTemplates,
    },
  },

  UIConstructor: UI,

shopify-buy

The JS Buy SDK is a lightweight library that allows you to build ecommerce into any website. It is based on Shopify's API and provides the ability to retrieve products and collections from your shop, add products to a cart, and checkout.

MIT
Latest version published 6 months ago

Package Health Score

73 / 100
Full package analysis