mirror of
https://github.com/ente-io/ente.git
synced 2025-08-13 09:47:17 +00:00
Move into web/
This commit is contained in:
37
web/packages/shared/components/LinkButton.tsx
Normal file
37
web/packages/shared/components/LinkButton.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import { ButtonProps, Link, LinkProps } from "@mui/material";
|
||||
import React, { FC } from "react";
|
||||
|
||||
export type LinkButtonProps = React.PropsWithChildren<{
|
||||
onClick: () => void;
|
||||
variant?: string;
|
||||
style?: React.CSSProperties;
|
||||
}>;
|
||||
|
||||
const LinkButton: 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)",
|
||||
paddingBottom: 0.5,
|
||||
"&:hover": {
|
||||
color: `${color}.main`,
|
||||
textDecoration: `underline `,
|
||||
textDecorationColor: `${color}.main`,
|
||||
},
|
||||
...sx,
|
||||
}}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
||||
export default LinkButton;
|
Reference in New Issue
Block a user