{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "style": {
    "display": "=if(@currentField=='','none','flex')",
    "flex-direction": "row",
    "align-items": "center"
  },
  "children": [
    {
      "elmType": "div",
      "txtContent": "@currentField"
    },
    {
      "elmType": "div",
      "style": {
        "cursor": "pointer",
        "width": "20px",
        "height": "20px",
        "display": "flex",
        "justify-content": "center",
        "align-items": "center",
        "border": "1px solid",
        "border-radius": "2px",
        "font-size": "17px",
        "margin-left": "5px"
      },
      "attributes": {
        "iconName": "QRCode",
        "class": "ms-bgColor-themeLight--hover"
      },
      "customCardProps": {
        "openOnEvent": "click",
        "directionalHint": "rightCenter",
        "isBeakVisible": true,
        "formatter": {
          "elmType": "div",
          "style": {
            "padding": "20px",
            "display": "flex",
            "flex-direction": "column",
            "align-items": "center",
            "white-space": "nowrap"
          },
          "children": [
            {
              "elmType": "img",
              "attributes": {
                "src": "='https://barcode.tec-it.com/barcode.ashx?code=QRCode&dpi=96&data=' + @currentField"
              }
            },
            {
              "elmType": "a",
              "txtContent": "Barcode Software by TEC-IT",
              "style": {
                "padding-top": "8px",
                "font-size": "15px",
                "font-family": "Source Sans Pro, Arial, sans-serif"
              },
              "attributes": {
                "href": "https://www.tec-it.com",
                "target": "_blank",
                "class": "ms-fontColor-themePrimary ms-fontColor-themeDark--hover"
              }
            }
          ]
        }
      }
    }
  ]
}