1.7.0 • Published 12 months ago

@ctrl/react-adsense v1.7.0

Weekly downloads
379
License
MIT
Repository
github
Last release
12 months ago

@ctrl/react-adsense npm CircleCI coverage status

DEMO: https://react-adsense.xmplaylist.com

Install

npm install @ctrl/react-adsense

Use

Use the standard AdSense code somewhere in your <head></head> as you normally would

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
import React from 'react';
import {Adsense} from '@ctrl/react-adsense';

// ads with no set-up
<Adsense
  client="ca-pub-7640562161899788"
  slot="7259870550"
/>

// ads with custom format
<Adsense
  client="ca-pub-7640562161899788"
  slot="7259870550"
  style={{ width: 500, height: 300 }}
  format=""
/>

// responsive and native ads
<Adsense
  client="ca-pub-7640562161899788"
  slot="7259870550"
  style={{ display: 'block' }}
  layout="in-article"
  format="fluid"
/>
1.7.0

12 months ago

1.6.2

1 year ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago