aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web/components/ui/action-button.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/web/components/ui/action-button.tsx')
-rw-r--r--packages/web/components/ui/action-button.tsx25
1 files changed, 0 insertions, 25 deletions
diff --git a/packages/web/components/ui/action-button.tsx b/packages/web/components/ui/action-button.tsx
deleted file mode 100644
index 42e16f65..00000000
--- a/packages/web/components/ui/action-button.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Button, ButtonProps } from "./button";
-import LoadingSpinner from "./spinner";
-
-export function ActionButton({
- children,
- loading,
- spinner,
- disabled,
- ...props
-}: ButtonProps & {
- loading: boolean;
- spinner?: React.ReactNode;
-}) {
- spinner ||= <LoadingSpinner />;
- if (disabled !== undefined) {
- disabled ||= loading;
- } else if (loading) {
- disabled = true;
- }
- return (
- <Button {...props} disabled={disabled}>
- {loading ? spinner : children}
- </Button>
- );
-}