UNPKG

next-google-ads

Version:

Google AdSense component for Next.js with optimized script loading

77 lines 2.21 kB
import { CSSProperties, FC } from 'react'; export type ConsentModeV2 = { ad_storage?: 'granted' | 'denied'; analytics_storage?: 'granted' | 'denied'; ad_user_data?: 'granted' | 'denied'; ad_personalization?: 'granted' | 'denied'; }; export type AutoAdsConfig = { enableAutoAds?: boolean; pageExclusions?: string[]; adDensity?: 'low' | 'medium' | 'high'; enableAdIntents?: boolean; }; export type AnchorPosition = 'top' | 'bottom' | 'both'; export type GoogleAdsenseProps = { className?: string; style?: CSSProperties; client: string; slot: string; layout?: string; layoutKey?: string; format?: 'auto' | 'fluid' | 'rectangle' | 'vertical' | 'horizontal'; responsive?: string; path?: string; npaMode?: boolean; adTest?: 'on' | 'off'; adChannel?: string; }; export type InArticleAdProps = { className?: string; style?: CSSProperties; client: string; slot: string; npaMode?: boolean; }; export type InFeedAdProps = { className?: string; style?: CSSProperties; client: string; slot: string; layoutKey: string; npaMode?: boolean; }; export type MultiplexAdProps = { className?: string; style?: CSSProperties; client: string; slot: string; format?: 'autorelaxed'; npaMode?: boolean; }; export type AnchorAdProps = { client: string; slot: string; position?: AnchorPosition; collapsible?: boolean; npaMode?: boolean; }; export type AutoAdsProps = { client: string; config?: AutoAdsConfig; consentMode?: ConsentModeV2; npaMode?: boolean; }; export declare const GoogleAdsenseWidget: FC<GoogleAdsenseProps>; export declare const InArticleAd: FC<InArticleAdProps>; export declare const InFeedAd: FC<InFeedAdProps>; export declare const MultiplexAd: FC<MultiplexAdProps>; export declare const AnchorAd: FC<AnchorAdProps>; export declare const AutoAdsScript: FC<AutoAdsProps>; export declare const NextGoogleAdsenseScript: FC<Pick<GoogleAdsenseProps, 'client'> & { npaMode?: boolean; crossOrigin?: boolean; }>; export declare const GoogleAdsense: FC<GoogleAdsenseProps>; export default GoogleAdsense; //# sourceMappingURL=index.d.ts.map