link-stack/apps/link/components/Button.tsx
2023-02-13 13:10:48 +00:00

29 lines
634 B
TypeScript

import { FC } from "react";
import Link from "next/link";
import { Button as MUIButton } from "@mui/material";
interface ButtonProps {
text: string;
color: string;
href: string;
}
export const Button: FC<ButtonProps> = ({ text, color, href }) => (
<Link href={href} passHref>
<MUIButton
variant="contained"
disableElevation
sx={{
fontFamily: "Poppins, sans-serif",
fontWeight: 700,
borderRadius: 999,
backgroundColor: color,
padding: "6px 30px",
margin: "20px 0px",
whiteSpace: "nowrap",
}}
>
{text}
</MUIButton>
</Link>
);