Back to Vendure

Link

docs/docs/reference/admin-ui-api/react-components/link.mdx

3.6.3786 B
Original Source
<GenerationInfo sourceFile="packages/admin-ui/src/lib/react/src/react-components/Link.tsx" sourceLine="22" packageName="@vendure/admin-ui" />

A React component which renders an anchor tag and navigates to the specified route when clicked. This is useful when you want to use a React component in a Vendure UI plugin which navigates to a route in the admin-ui.

Example

ts
import { Link } from '@vendure/admin-ui/react';

export const MyReactComponent = () => {
    return <Link href="/extensions/my-extension">Go to my extension</Link>;
}
ts
function Link(props: PropsWithChildren<{ href: string; [props: string]: any }>): void

Parameters

props

<MemberInfo kind="parameter" type={PropsWithChildren<{ href: string; [props: string]: any }>} />