Created part of the homepage of the new Figma designs
This commit is contained in:
23
src/components/Low/Button.tsx
Normal file
23
src/components/Low/Button.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user