mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-05-29 19:39:28 +02:00
init
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { LuLoaderCircle } from "react-icons/lu";
|
||||
import { type ButtonProps, Button as UIButton } from "./ui/button";
|
||||
type Props = ButtonProps & {
|
||||
isLoading: boolean;
|
||||
"aria-label"?: string;
|
||||
};
|
||||
export const LoadingButton = ({ isLoading, ...props }: Props) => {
|
||||
return (
|
||||
<UIButton className="grid place-items-center" {...props}>
|
||||
{isLoading ? (
|
||||
<LuLoaderCircle className="h-4 w-4 animate-spin" />
|
||||
) : (
|
||||
props.children
|
||||
)}
|
||||
</UIButton>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user