start on custom server
This commit is contained in:
27
packages/docs-new/src/components/app-link.tsx
Normal file
27
packages/docs-new/src/components/app-link.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import React from "react"
|
||||
import { ExternalLink } from "./external-link"
|
||||
|
||||
export type AppLinkProps = {
|
||||
type: "internal" | "external"
|
||||
label: React.ReactNode
|
||||
to: string
|
||||
className?: string
|
||||
}
|
||||
|
||||
export function AppLink(props: AppLinkProps) {
|
||||
switch (props.type) {
|
||||
case "internal":
|
||||
return (
|
||||
<a className={props.className} href={props.to}>
|
||||
{props.label}
|
||||
</a>
|
||||
)
|
||||
|
||||
case "external":
|
||||
return (
|
||||
<ExternalLink className={props.className} href={props.to}>
|
||||
{props.label}
|
||||
</ExternalLink>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user