refactor: switch to ripple button

This commit is contained in:
zhom
2025-08-08 10:46:00 +04:00
parent 5c58b5c644
commit 1cb9ffa249
25 changed files with 344 additions and 82 deletions
+9 -2
View File
@@ -1,5 +1,8 @@
import { LuLoaderCircle } from "react-icons/lu";
import { type ButtonProps, Button as UIButton } from "./ui/button";
import {
type RippleButtonProps as ButtonProps,
RippleButton as UIButton,
} from "./ui/ripple";
type Props = ButtonProps & {
isLoading: boolean;
@@ -7,7 +10,11 @@ type Props = ButtonProps & {
};
export const LoadingButton = ({ isLoading, ...props }: Props) => {
return (
<UIButton className="grid place-items-center" {...props}>
<UIButton
className="grid place-items-center"
{...props}
disabled={props.disabled || isLoading}
>
{isLoading ? (
<LuLoaderCircle className="h-4 w-4 animate-spin" />
) : (