mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
28 lines
719 B
JavaScript
28 lines
719 B
JavaScript
![]() |
import React, {Component} from 'react';
|
||
|
import './carbon.css';
|
||
|
|
||
|
export default class Carbon extends Component {
|
||
|
componentDidMount() {
|
||
|
if (this.container) {
|
||
|
const script = document.createElement('script');
|
||
|
|
||
|
script.src =
|
||
|
'//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=html2canvashertzencom';
|
||
|
script.async = true;
|
||
|
script.id = '_carbonads_js';
|
||
|
this.container.appendChild(script);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
render() {
|
||
|
return (
|
||
|
<div
|
||
|
{...this.props}
|
||
|
ref={container => {
|
||
|
this.container = container;
|
||
|
}}
|
||
|
/>
|
||
|
);
|
||
|
}
|
||
|
}
|