• Generates a QR code HTML image using https://github.com/davidshimjs/qrcodejs

    Parameters

    • args: {
          colorDark?: string;
          colorLight?: string;
          correctLevel?: any;
          domElement?: HTMLElement;
          height?: number;
          showLogo?: boolean;
          showUrl?: boolean;
          text: string;
          width?: number;
      }
      • OptionalcolorDark?: string

        The color of the dark squares

      • OptionalcolorLight?: string

        The color of the light squares

      • OptionalcorrectLevel?: any

        The error correction level to use

      • OptionaldomElement?: HTMLElement

        The dom element to append the QR code to. If not provided a new div will be created and returned

      • Optionalheight?: number

        The height of the QR code

      • OptionalshowLogo?: boolean

        If true, the logo will be shown in the center of the QR code. By default the Needle Logo will be used. You can override which logo is being used by setting the needle-engine web component's qr-logo-src attribute. The logo can also be disabled by setting that attribute to a falsey value (e.g. "0" or "false")

      • OptionalshowUrl?: boolean

        If true, the URL will be shown below the QR code

      • text: string

        The text to encode

      • Optionalwidth?: number

        The width of the QR code

    Returns Promise<HTMLElement>

    The dom element containing the QR code