diff --git a/web/src/components/ui/Button.tsx b/web/src/components/ui/Button.tsx index db4b6ed..ab30a16 100644 --- a/web/src/components/ui/Button.tsx +++ b/web/src/components/ui/Button.tsx @@ -47,17 +47,27 @@ export interface ButtonProps const Button = React.forwardRef( ({ className, variant, size, loading, disabled, asChild = false, children, ...props }, ref) => { - const Comp = asChild ? Slot : 'button' + if (asChild) { + return ( + + {children} + + ) + } return ( - - {loading && !asChild && } + {loading && } {children} - + ) } )