17 lines
385 B
TypeScript
17 lines
385 B
TypeScript
import { PropsWithChildren } from "react";
|
|
import { Link } from "react-router-dom";
|
|
|
|
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>
|
|
);
|
|
}
|