Files
TechRadarAJR/src/components/Link/Link.tsx
2022-09-13 11:28:06 +02:00

26 lines
445 B
TypeScript

import React from "react";
import { Link as RLink } from "react-router-dom";
import "./link.scss";
type LinkProps = {
pageName: string;
style?: React.CSSProperties;
className?: string;
};
function Link({
pageName,
children,
className,
style = {},
}: React.PropsWithChildren<LinkProps>) {
return (
<RLink to={`/${pageName}.html`} style={style} {...{ className }}>
{children}
</RLink>
);
}
export default Link;