2.5.3 • Published 6 years ago

@adactive/arc-qrcode v2.5.3

Weekly downloads
1
License
UNLISENCED
Repository
github
Last release
6 years ago

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`
2.5.3

6 years ago

2.5.1

6 years ago

2.5.0

6 years ago

2.4.0

6 years ago

2.3.0

6 years ago

2.2.0

6 years ago

2.2.0-rc.4

6 years ago

2.2.0-rc.3

6 years ago

2.2.0-rc.2

6 years ago

2.2.0-rc.1

6 years ago

2.2.0-rc.0

6 years ago

2.2.0-alpha.1

6 years ago

2.2.0-alpha.0

6 years ago

2.1.0

6 years ago

2.1.0-rc.1

6 years ago

2.1.0-rc.0

6 years ago

2.1.0-alpha.1

6 years ago

2.1.0-alpha.0

6 years ago

2.0.0

6 years ago

2.0.0-rc.0

6 years ago

2.0.0-alpha.6

6 years ago

2.0.0-alpha.5

6 years ago

2.0.0-alpha.4

6 years ago

2.0.0-alpha.3

6 years ago

2.0.0-alpha.2

6 years ago

2.0.0-alpha.1

6 years ago

2.0.0-alpha.0

6 years ago

1.1.0

6 years ago

1.1.0-rc2

6 years ago

1.1.0-alpha.0

6 years ago

1.0.0

6 years ago

0.0.2-y.44.59

6 years ago

0.0.2-y.44.58

6 years ago

0.0.2-y.44.57

6 years ago

0.0.2-y.44.56

6 years ago

0.0.2-y.44.55

6 years ago

0.0.2-y.44.54

6 years ago

0.0.2-y.44.53

6 years ago

0.0.2-y.44.52

6 years ago

0.0.2-y.44.51

6 years ago

0.0.2-y.44.50

6 years ago

0.0.2-y.44.49

6 years ago

0.0.2-y.44.48

6 years ago

0.0.2-y.44.47

6 years ago

0.0.2-y.44.46

6 years ago

0.0.2-y.44.45

6 years ago

0.0.2-y.44.44

6 years ago

0.0.2-y.44.43

6 years ago

0.0.2-y.44.42

6 years ago

0.0.2-y.44.41

6 years ago

0.0.2-y.44.40

6 years ago

0.0.2-y.44.39

6 years ago

0.0.2-y.44.37

6 years ago

0.0.2-y.44.36

6 years ago

0.0.2-y.44.35

6 years ago

0.0.2-y.44.34

6 years ago

0.0.2-y.44.33

6 years ago

0.0.2-y.44.32

6 years ago

0.0.2-y.44.31

6 years ago

0.0.2-y.44.30

6 years ago

0.0.2-y.44.29

6 years ago

0.0.2-y.44.28

6 years ago

0.0.2-y.44.27

6 years ago

0.0.2-y.44.26

6 years ago

0.0.2-y.44.25

6 years ago

0.0.2-y.44.24

6 years ago

0.0.2-y.44.23

6 years ago

0.0.2-y.44.22

6 years ago