fix: streamline subscription connection dialogs and actions

This commit is contained in:
amosblomqvist
2026-10-25 01:34:46 +03:00
parent d6e317c6fe
commit 55a6501a09
5 changed files with 163 additions and 70 deletions
+8 -1
View File
@@ -8,7 +8,14 @@ export function ConnectionRow({ label, action, disabled, onAction, children, tes
return <div className="flex flex-wrap items-center gap-3" data-testid={testid}>
<span className="font-ui text-xs text-foreground">{label}</span>
{children}
<Button type="button" size="xs" variant={action === "Connect" ? "outline" : "ghost"} className="cursor-pointer disabled:cursor-not-allowed" data-testid={actionTestid} disabled={disabled} onClick={onAction}>{action}</Button>
<Button type="button" size="xs" variant={action === "Connect" ? "outline" : "ghost"} className={`cursor-pointer disabled:cursor-not-allowed ${action === "Connect" ? "" : "text-muted-foreground hover:text-foreground"}`} data-testid={actionTestid} disabled={disabled} onClick={onAction}>{action}</Button>
</div>;
}
export function ConnectionFooter({ leading, children, testid }: { leading?: React.ReactNode; children: React.ReactNode; testid?: string }) {
return <div className="mt-4 flex flex-wrap items-center justify-between gap-3" data-testid={testid}>
{leading}
<div className="ml-auto flex flex-wrap items-center justify-end gap-2">{children}</div>
</div>;
}