JSFiddle - React, Tailwind, and code Playground

by VladimirC

HTML

<div id='product-component-1585569803212'></div>
<script type="text/javascript">
/*<![CDATA[*/
(function () {
  var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js';
  if (window.ShopifyBuy) {
    if (window.ShopifyBuy.UI) {
      ShopifyBuyInit();
    } else {
      loadScript();
    }
  } else {
    loadScript();
  }
  function loadScript() {
    var script = document.createElement('script');
    script.async = true;
    script.src = scriptURL;
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script);
    script.onload = ShopifyBuyInit;
  }
  function ShopifyBuyInit() {
    var client = ShopifyBuy.buildClient({
      domain: 'bei-fuchs-hase.myshopify.com',
      storefrontAccessToken: '6901072a2c2d3e1bf907bf2280b6bb08',
    });
    ShopifyBuy.UI.onReady(client).then(function (ui) {
      ui.createComponent('product', {
        id: '4485325586480',
        node: document.getElementById('product-component-1585569803212'),
        moneyFormat: '%E2%82%AC%7B%7Bamount_with_comma_separator%7D%7D',
        options: {
  "product": {
    "variantId": "8847592259628",
    "width": "100%",
    "contents": {
      "img": false,
      "imgWithCarousel": false,
      "title": false,
      "variantTitle": false,
      "options": true,
      "price": false,
      "description": false,
      "buttonWithQuantity": false,
      "quantity": false
    },
    "text": {
      "button": "In den Korb"
    },
    "styles": {
      "product": {
        "@media (min-width: 601px)": {
          "max-width": "100%",
          "margin-left": "0px",
          "margin-bottom": "0px",
        }
      },
      "options": {
        "max-width": "100% !important"
      },
      "button": {
        "background-color": "00000",
        "font-family": "Source Sans Pro, sans-serif",
        "font-size": "16px",
        "padding-left": "46px",
        "padding-right": "46px", 
        "padding-top": "17px",
  ...