feat: proper redirect handling
This commit is contained in:
@ -9,7 +9,7 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
loading?: boolean;
|
||||
variant?: "contained" | "outlined" | "text";
|
||||
variant?: "contained" | "outlined" | "text" | "icon";
|
||||
}
|
||||
|
||||
export const Button: FC<ButtonProps> = ({
|
||||
@ -22,11 +22,13 @@ export const Button: FC<ButtonProps> = ({
|
||||
const appearance = useMemo(() => {
|
||||
switch (variant) {
|
||||
case "contained":
|
||||
return "bg-blue-600 text-white hover:bg-blue-700";
|
||||
return "px-4 py-2 bg-blue-600 text-white hover:bg-blue-700";
|
||||
case "outlined":
|
||||
return "border border-blue-600 text-blue-600 hover:text-blue-700 font-medium";
|
||||
return "px-4 py-2 border border-blue-600 text-blue-600 hover:text-blue-700 font-medium";
|
||||
case "text":
|
||||
return "text-blue-600 hover:text-blue-700 font-medium";
|
||||
return "py-2 px-4 text-blue-600 hover:text-blue-700 font-medium";
|
||||
case "icon":
|
||||
return "py-0 px-0 text-gray-400 hover:text-gray-600";
|
||||
}
|
||||
|
||||
return "";
|
||||
@ -34,7 +36,7 @@ export const Button: FC<ButtonProps> = ({
|
||||
|
||||
return (
|
||||
<button
|
||||
className={`cursor-pointer py-2 px-4 rounded-md transition-colors ${appearance} ${
|
||||
className={`${appearance} cursor-pointer rounded-md transition-colors ${
|
||||
className || ""
|
||||
}${
|
||||
loading
|
||||
|
Reference in New Issue
Block a user