2.1.4 • Published 1 year ago

lesca-react-capture-button v2.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

NPM React React React React React NPM

Why use it?

get base64 image use local file or mobile camera.

Live Demo

Installation

npm install lesca-react-capture-button --save

Usage

import CaptureProvider, { DOMString } from 'lesca-react-capture-button';

render() {
    return (
        <CaptureProvider
          type={DOMString.png}
          compress={0.5}
          maxWidth={500}
          onCapture={(data) => {
            const { image } = data;
            console.log(image);
          }}
        >
          <button>capture</button>
        </CaptureProvider>
    );
}

Development

props

Propertiesdescriptiondefault
onCapture:functioncallbackvoid
compress:floatimage compress (0 - 1)0.7
maxWidth:intimage max width size1024
type:stringtype'image/png'

Features

  • maintain if necessary
2.1.4

1 year ago

2.1.2

1 year ago

2.1.3

1 year ago

2.1.1

1 year ago

2.0.8

1 year ago

2.1.0

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.0

3 years ago

1.2.2

2 years ago

1.2.1

3 years ago

1.1.0

3 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago