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;
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user