Add TextLink component

This commit is contained in:
Prayag Prajapati committed 2023-09-17 19:27:28 +05:30
1 parent d7a573e8db
commit c3f18282c4
7 files changed
+96 -18

No files matched your search

+22
View File
@@ -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;
@@ -0,0 +1,11 @@
/** @format */
.link {
text-decoration: underline;
text-decoration-color: rgb(255 255 255 / 0.5);
white-space: pre-line;
&:hover {
cursor: pointer;
text-decoration-color: rgb(255 255 255 / 1);
}
}