17 lines
386 B
TypeScript
17 lines
386 B
TypeScript
import { type PropsWithChildren } from "react";
|
|
import { Link } from "react-router";
|
|
|
|
export function RouterLink(
|
|
p: PropsWithChildren<{ to: string; target?: React.HTMLAttributeAnchorTarget }>
|
|
): React.ReactElement {
|
|
return (
|
|
<Link
|
|
to={p.to}
|
|
target={p.target}
|
|
style={{ color: "inherit", textDecoration: "inherit" }}
|
|
>
|
|
{p.children}
|
|
</Link>
|
|
);
|
|
}
|