import React, {Component} from 'react'; import './example.css'; import icon from '../images/ic_camera_alt_black_24px.svg'; import close from '../images/ic_close_black_24px.svg'; import html2canvas from 'html2canvas'; class CanvasContainer extends Component { constructor(props) { super(props); this.state = {open: false, complete: false}; } componentDidMount() { if (this.container) { this.container.appendChild(this.props.canvas); setTimeout(() => { this.props.canvas.style.opacity = '1'; this.props.canvas.style.transform = 'scale(0.8)'; }, 10); } } render() { return (
Test out html2canvas by rendering the viewport from the current page.