- Updated the colors of the application;
- Added the ability for a user to partially update their profile
This commit is contained in:
@@ -3,26 +3,26 @@ import {ReactNode} from "react";
|
||||
|
||||
interface Props {
|
||||
children: ReactNode;
|
||||
color?: "orange" | "green" | "blue";
|
||||
color?: "rose" | "purple" | "red";
|
||||
variant?: "outline" | "solid";
|
||||
className?: string;
|
||||
disabled?: boolean;
|
||||
onClick?: () => void;
|
||||
}
|
||||
|
||||
export default function Button({color = "green", variant = "solid", disabled = false, className, children, onClick}: Props) {
|
||||
export default function Button({color = "purple", variant = "solid", disabled = false, className, children, onClick}: Props) {
|
||||
const colorClassNames: {[key in typeof color]: {[key in typeof variant]: string}} = {
|
||||
green: {
|
||||
purple: {
|
||||
solid: "bg-mti-purple-light text-white hover:bg-mti-purple disabled:text-mti-purple disabled:bg-mti-purple-ultralight selection:bg-mti-purple-dark",
|
||||
outline:
|
||||
"bg-transparent text-mti-purple-light border border-mti-purple-light hover:bg-mti-purple-light disabled:text-mti-purple disabled:bg-mti-purple-ultralight selection:bg-mti-purple-dark hover:text-white selection:text-white",
|
||||
},
|
||||
blue: {
|
||||
red: {
|
||||
solid: "bg-mti-red-light text-white hover:bg-mti-red disabled:text-mti-red disabled:bg-mti-red-ultralight selection:bg-mti-red-dark",
|
||||
outline:
|
||||
"bg-transparent text-mti-red-light border border-mti-red-light hover:bg-mti-red-light disabled:text-mti-red disabled:bg-mti-red-ultralight selection:bg-mti-red-dark hover:text-white selection:text-white",
|
||||
},
|
||||
orange: {
|
||||
rose: {
|
||||
solid: "bg-mti-orange-light text-white hover:bg-mti-orange disabled:text-mti-orange disabled:bg-mti-orange-ultralight selection:bg-mti-orange-dark",
|
||||
outline:
|
||||
"bg-transparent text-mti-orange-light border border-mti-orange-light hover:bg-mti-orange-light disabled:text-mti-orange disabled:bg-mti-orange-ultralight selection:bg-mti-orange-dark hover:text-white selection:text-white",
|
||||
|
||||
Reference in New Issue
Block a user