react-google-ads
v1.0.5
Published
React component for google adsense
Downloads
48
Maintainers
Readme
React Google Ads
A Component for google adsense
Getting Started
# Installation with package manager
$ yarn add react react-dom react-google-ads
# or..
$ npm i -S react react-dom react-google-ads
Development
$ npm run demo
- access localhost:8888
Production Bundle
$ npm run bundle
How to Use
Parameters
| Parameter | Type | Remarks | |:----------|:-------|:----------------| | client | string | Required | | slot | string | Required | | style | object | - | | format | string | default: 'auto' |
Basic
import React from 'react';
import ReactDOM from 'react-dom';
import GoogleAds from '../src';
const appRoot = document.getElementById('google-adsense');
ReactDOM.render(
<GoogleAds
client=""
slot=""
style={{ display: 'inline-block', width: '100%', }}
/>, appRoot
);
Change Log
1.0.0
- Initial release
1.0.2
- Added
className
property to add custom class to<ins>
tag.
1.0.3
- migrate
webpack
- migrate
babel preset
1.0.4
- fix typos in
README.md
1.0.5
- add
prop-types
forreact^16