File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
site/src/pages/WorkspacesPage Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -545,6 +545,7 @@ const WorkspaceActionsCell: FC<WorkspaceActionsCellProps> = ({
545
545
< PrimaryAction
546
546
onClick = { ( ) => setIsStopConfirmOpen ( true ) }
547
547
isLoading = { stopWorkspaceMutation . isPending }
548
+ disabled = { stopWorkspaceMutation . isPending }
548
549
label = "Stop workspace"
549
550
>
550
551
< SquareIcon />
@@ -611,20 +612,27 @@ const WorkspaceActionsCell: FC<WorkspaceActionsCellProps> = ({
611
612
type PrimaryActionProps = PropsWithChildren < {
612
613
label : string ;
613
614
isLoading ?: boolean ;
615
+ disabled ?: boolean ;
614
616
onClick : ( ) => void ;
615
617
} > ;
616
618
617
619
const PrimaryAction : FC < PrimaryActionProps > = ( {
618
620
onClick,
619
621
isLoading,
622
+ disabled,
620
623
label,
621
624
children,
622
625
} ) => {
623
626
return (
624
627
< TooltipProvider >
625
628
< Tooltip >
626
629
< TooltipTrigger asChild >
627
- < Button variant = "outline" size = "icon-lg" onClick = { onClick } >
630
+ < Button
631
+ variant = "outline"
632
+ size = "icon-lg"
633
+ onClick = { onClick }
634
+ disabled = { disabled }
635
+ >
628
636
< Spinner loading = { isLoading } > { children } </ Spinner >
629
637
< span className = "sr-only" > { label } </ span >
630
638
</ Button >
You can’t perform that action at this time.
0 commit comments