Add TextLink component
This commit is contained in:
7 files changed
+96
-18
No files matched your search
@@ -0,0 +1,22 @@
|
||||
/** @format */
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import "./textLink.module.scss";
|
||||
|
||||
const TextLink = ({ text, location, variant }) => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
return (
|
||||
<Typography
|
||||
variant={variant}
|
||||
className="link"
|
||||
onClick={() => navigate(location)}
|
||||
>
|
||||
{text}
|
||||
</Typography>
|
||||
);
|
||||
};
|
||||
|
||||
export default TextLink;
|
||||
Reference in new issue
Block a user