Created part of the homepage of the new Figma designs

This commit is contained in:
Tiago Ribeiro
2023-06-11 17:58:06 +01:00
parent 9a7853bd05
commit b2232df0c7
5 changed files with 91 additions and 21 deletions

View File

@@ -0,0 +1,23 @@
import clsx from "clsx";
import {ReactNode} from "react";
interface Props {
children: ReactNode;
color?: "orange" | "green" | "blue";
variant?: "outline" | "solid";
onClick: () => void;
}
export default function Button({color = "green", variant = "solid", children, onClick}: Props) {
const colorClassNames: {[key in typeof color]: string} = {
green: "bg-mti-green hover:bg-mti-green-dark disabled:text-mti-green disabled:bg-mti-green-ultralight",
blue: "bg-mti-blue hover:bg-mti-blue-dark disabled:text-mti-blue disabled:bg-mti-blue-ultralight",
orange: "bg-mti-orange hover:bg-mti-orange-dark disabled:text-mti-orange disabled:bg-mti-orange-ultralight",
};
return (
<button onClick={onClick} className={clsx("py-3 px-6 text-white", colorClassNames[color])}>
{children}
</button>
);
}