Skip to content

Instantly share code, notes, and snippets.

@mariorcardoso
Last active April 28, 2022 13:54
Show Gist options
  • Save mariorcardoso/2d95e818d74c229854414347d2eaad38 to your computer and use it in GitHub Desktop.
Save mariorcardoso/2d95e818d74c229854414347d2eaad38 to your computer and use it in GitHub Desktop.
export const ScreenshotTool = () => {
...
return (
<Fragment>
<div>
<button disabled={canCapture} onClick={startImagePreview}>
Preview
</button>
<button disabled={!canCapture} onClick={captureImageInPreview}>
Capture
</button>
</div>
<div>
<div>Preview 🎥</div>
<video className="Frame" id="video" ref={videoRef} autoPlay></video>
</div>
<div>
<div>Image 🖼️</div>
<img
className="Frame"
alt="Screen capture will be displayed here"
src={image}
onClick={() => openImage(image)}
></img>
</div>
</Fragment>
);
};
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment