UNPKG

react-facebook

Version:

Facebook components like a Login button, Like, Share, Comments, Embedded Post/Video, Messenger Chat, and Facebook Pixel tracking

23 lines (22 loc) 977 B
import React from 'react'; import type { ReactNode } from 'react'; import FacebookPixel from '../utils/FacebookPixel'; import type { PixelOptions } from '../utils/FacebookPixel'; export type FacebookPixelContextInterface = { isLoading: boolean; error: Error | undefined; init: () => Promise<void>; pixel: FacebookPixel | undefined; pageView: () => Promise<void>; track: (eventName: string, data?: Record<string, any>) => Promise<void>; trackCustom: (eventName: string, data?: Record<string, any>) => Promise<void>; grantConsent: () => Promise<void>; revokeConsent: () => Promise<void>; fbq: (...args: any[]) => Promise<void>; }; export declare const FacebookPixelContext: React.Context<FacebookPixelContextInterface | undefined>; export type FacebookPixelProviderProps = PixelOptions & { children: ReactNode; lazy?: boolean; }; export default function FacebookPixelProvider(props: FacebookPixelProviderProps): React.JSX.Element;