UNPKG

@reactionable/amplify

Version:
14 lines (13 loc) 990 B
import { AuthenticatorProps } from "@aws-amplify/ui-react"; import { IIdentityProviderProps as ICoreIdentityProviderProps, IIdentityProviderValue as ICoreIdentityProviderValue, IUser as ICoreUser } from "@reactionable/core"; import { ComponentType, ReactElement } from "react"; export type IUser = ICoreUser & { id: string; username: string; }; export type IIdentityProviderProps = ICoreIdentityProviderProps<IUser> & Omit<AuthenticatorProps, "children">; export type IIdentityProviderValue = ICoreIdentityProviderValue<IUser> & AuthenticatorProps; export declare const useIdentityProviderProps: (props?: Partial<IIdentityProviderProps>) => IIdentityProviderProps; export declare function useIdentityContext(): IIdentityProviderValue; export declare function withIdentityContext(Component: ComponentType, identityProviderProps?: Partial<IIdentityProviderProps>): ReactElement; export declare const IdentityContextProvider: (props?: Partial<IIdentityProviderProps>) => ReactElement;