UNPKG

react-facebook

Version:

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

22 lines (21 loc) 811 B
import React, { type ReactNode, type ReactElement, type ComponentType, type ElementType } from 'react'; import type { LoginOptions } from '../hooks/useLogin'; import type { LoginResponse } from '../utils/Facebook'; type LoginRenderProps = { onClick: () => void; isLoading: boolean; isDisabled: boolean; }; export type LoginProps = Omit<LoginOptions, 'scope'> & { children?: ReactNode | ((props: LoginRenderProps) => ReactElement); onSuccess?: (response: LoginResponse) => void; onError?: (error: Error) => void; onProfileSuccess?: (profile: any) => void; scope?: string | string[]; fields?: string[]; as?: ElementType | ComponentType<any>; disabled?: boolean; [key: string]: any; }; export default function Login(props: LoginProps): React.JSX.Element; export {};