2.1.4 • Published 15 days ago
lesca-react-capture-button v2.1.4
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
Properties | description | default |
---|---|---|
onCapture:function | callback | void |
compress:float | image compress (0 - 1) | 0.7 |
maxWidth:int | image max width size | 1024 |
type:string | type | 'image/png' |
Features
- maintain if necessary
2.1.4
15 days ago
2.1.2
2 months ago
2.1.3
2 months ago
2.1.1
4 months ago
2.0.8
4 months ago
2.1.0
4 months ago
2.0.7
4 months ago
2.0.6
4 months ago
2.0.5
4 months ago
2.0.3
7 months ago
2.0.2
8 months ago
2.0.4
7 months ago
2.0.1
8 months ago
2.0.0
8 months ago
1.2.0
1 year ago
1.2.2
1 year ago
1.2.1
1 year ago
1.1.0
2 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago