You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d34cb6e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .changeset/26665-action-block-destructive-confirm.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@
3
3
'@object-ui/types': patch
4
4
---
5
5
6
-
fix(ui): a `destructive` action block confirms through the destructive button (#26665)
6
+
fix(ui): a destructive action block confirms through the destructive button (#26665)
7
7
8
8
Clause-②: no
9
9
Metadata-protocol: none
10
10
11
-
The four action blocks (`action:button`, `action:icon`, `action:group`, `action:menu`) now forward their `variant` to the action runner. `@objectstack/spec` spells the value in two dialects, each on its own surface: the blocks' rows take the Button primitive's vocabulary plus `primary`, and `ActionSchema`, which the runner dispatches, takes `primary | secondary | danger | ghost | link`. The forward translates: `destructive` becomes `danger`, `primary` / `secondary` / `ghost` / `link`pass through, and `default` / `outline` forward nothing. So a block declared `variant: 'destructive'` with a `confirmText` now asks its question through the destructive confirm button, where before it asked through a neutral one.
11
+
The four action blocks (`action:button`, `action:icon`, `action:group`, `action:menu`) now forward their `variant` to the action runner, which reads it to paint the confirm button: a destructive block with a `confirmText` now asks its question through the destructive confirm button, where before it asked through a neutral one. `danger` / `primary` / `secondary` / `ghost` / `link`forward as they are, and `default` / `outline`, which an action's own `variant` has no word for, forward nothing. The destructive value is spelled `danger` on the blocks, the same word `ActionSchema.variant` uses (see the action block variant entry in this release).
12
12
13
-
`UIActionSchema.variant` (`@object-ui/types`) now takes the block rows' vocabulary by reference (`ActionButtonProps['variant']`), which adds `link`, a value those rows already accept.`danger` stays refused there, as the block rows refuse it.
13
+
`UIActionSchema.variant` (`@object-ui/types`) now takes the block rows' vocabulary by reference (`ActionButtonProps['variant']`), which adds `link`, a value those rows already accept.
0 commit comments