🚨 Shai-Hulud Strikes Again:More than 500 packages and 700+ versions compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@adactive/arc-qrcode

Package Overview
Dependencies
Maintainers
4
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adactive/arc-qrcode

Adsum QrCode Component

latest
Source
npmnpm
Version
2.5.3
Version published
Weekly downloads
12
300%
Maintainers
4
Weekly downloads
 
Created
Source

QrCode component

Getting started

    npm i --save @adactive/arc-qrcode

OR

    yarn add @adactive/arc-qrcode

Usage

    import AdsumQrCode, { modes, ecLevel } from '@adactive/arc-qrcode';
    ...
    state = {
        openModal: false
    }
    
    onOpenModal = () => {
        this.setState({ openModal: true });
    };
    
    onCloseModal = () => {
        this.setState({ openModal: false });
    };
    
    const qrCodeOptions = {
        size: 400,
        ecLevel: ecLevel.QUARTILE,
        minVersion: 8,
        background: '#fff',
        mode: modes.DRAW_WITH_IMAGE_BOX,
        radius: 0.5,
        image: 'https://raw.githubusercontent.com/AdactiveSAS/adsum-react-components/master/logo.jpg',
        mSize: 0.15,
    };
    
    <button onClick={this.onOpenModal}>Open QrCode Modal</button>
    
    <AdsumQrCode
        isOpen={this.state.openModal}
        onClose={this.onCloseModal}
        qrCodeOptions={qrCodeOptions}
        text="https://adactive.com"
    />

Props

type PropsType = {|
    +isOpen: boolean,
    +onClose: () => null,
    +text: string,
    +qrCodeOptions: Object,
    +ModalProps?: Object,
    +qrCodeCSS?: CSSStyleDeclaration
|};

static defaultProps = {
    isOpen: false,
    onClose: () => null,
    text: '',
    qrCodeOptions: {},
    ModalProps: {},
};

isOpen -> To show or hide qrCode component

onClose -> A callback function to close the qrCode component

text -> Url value to be embedded into qrcode

qrCodeOptions -> Refer to qrcode.es for more information

ModalProps -> Refer to react-responsive-modal for more information

qrCodeCSS -> To customise CSS for the qrCode canvas

Copy component inside your project src folder

Less only

`npx @adactive/arc-qrCode copy --less-only`

Full copy

`npx @adactive/arc-qrCode copy`

Keywords

adsum

FAQs

Package last updated on 07 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts