ente/web/packages/shared/components/LinkButton.tsx
Manav Rathi 38895eaf56
Unprop
2025-01-17 10:03:33 +05:30

28 lines
761 B
TypeScript

import { Link, type ButtonProps, type LinkProps } from "@mui/material";
import React from "react";
const LinkButton: React.FC<
LinkProps<"button", { color?: ButtonProps["color"] }>
> = ({ children, sx, color, ...props }) => {
return (
<Link
component="button"
sx={{
color: "text.base",
textDecoration: "underline rgba(255, 255, 255, 0.4)",
"&:hover": {
color: `${color}.main`,
textDecoration: `underline `,
textDecorationColor: `${color}.main`,
},
...sx,
}}
{...props}
>
{children}
</Link>
);
};
export default LinkButton;