UNPKG

@commercelayer/react-components

Version:
60 lines (59 loc) 1.74 kB
import { type JSX } from 'react'; import type { ChildrenFunction } from '../../typings/index'; interface ChildrenProps extends Omit<Props, 'children'> { /** * The link href */ href: string; } interface Props extends Omit<JSX.IntrinsicElements['a'], 'children'> { /** * A render function to render your own custom component */ children?: ChildrenFunction<ChildrenProps>; /** * The label of the link */ label: string | JSX.Element; /** * The type of the link */ type: 'login' | 'signup'; /** * The client id of the Commerce Layer application */ clientId: string; /** * The scope of the Commerce Layer application */ scope: string; /** * The return url to redirect the user after the login/signup */ returnUrl?: string; /** * The domain of your forked application */ customDomain?: string; /** * The reset password url */ resetPasswordUrl?: string; } /** * This component generates a link to the hosted mfe-identity application. * * In this way you can connect your shop application with our hosted micro-frontend and let your customers manage their account with zero code. * * <span title="Requirement" type="warning"> * Must be a child of the `<CommerceLayer>` component. * </span> * * <span title="My Identity" type="info"> * The Commerce Layer Identity micro frontend (React) provides you with an application, powered by Commerce Layer APIs, handling customer login and sign-up functionalities * </span> * * @link https://github.com/commercelayer/mfe-identity */ export declare function MyIdentityLink(props: Props): JSX.Element; export default MyIdentityLink;