VirtWeb/virtweb_frontend/src/widgets/RouterLink.tsx

17 lines
385 B
TypeScript
Raw Normal View History

2023-09-04 12:11:56 +00:00
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>
);
}