swarm-ui: extract ConfirmDialog, use it for the destroy confirm
mara, reviewing the swarm-ui destroy-trigger PR: "why the extra styling? shouldnt there be a component that does this already?" There wasnt one -- Dialog is deliberately content-agnostic (see its own file-top comment), so the destroy confirm had grown its own page-scoped .agents-destroy-confirm/-actions CSS for what is really a generic "message + cancel/confirm button row" shape. Extracted ui/confirm-dialog/ConfirmDialog.tsx: wraps Dialog, owns the button row, leaves the message body to the caller via children. AgentsPage now uses it instead of a bare Dialog + bespoke CSS; deleted the now-unused AgentsPage.css.
This commit is contained in:
parent
becc025f13
commit
82a4324b17
4 changed files with 81 additions and 39 deletions
|
|
@ -1,17 +0,0 @@
|
|||
/* <AgentsPage> — the destroy-confirm dialog's own layout. Everything
|
||||
else on this page (the table, the wanted/destroy badges) draws chrome
|
||||
from the shared `ui/` kit and needs nothing page-scoped; this file
|
||||
exists only because the confirm dialog's copy + button row needed
|
||||
somewhere to live, same reasoning as CreateAgentForm.css owning its
|
||||
own layout next to the shared form-kit chrome it wraps. */
|
||||
.agents-destroy-confirm {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1em;
|
||||
max-width: 28em;
|
||||
}
|
||||
.agents-destroy-confirm-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 0.75em;
|
||||
}
|
||||
Loading…
Reference in a new issue