Skip to content
This repository was archived by the owner on Sep 30, 2025. It is now read-only.
This repository was archived by the owner on Sep 30, 2025. It is now read-only.

[PageActions] Action props do not match button props #10995

@FCalabria

Description

@FCalabria

Issue summary

Defining a page action with destructive: true does not changes the visual style of the button.

16-17-vlfd0-d97n7

Edit: Apparently the contract for an action still accept a lot of deprecated button props like destructive, outline and plain (see types) that are lost in the buttonFrom util

Expected behavior

Actions (both primary and secondary) that are destructive: true should show a button with tone="critical" and an appropiate variant or primary value depending on other props.
Actions with plain: true should show a button with variant="plain"

Actual behavior

There is no way to make an action look "destructive" or customize its appearance, since tone and variant are not acceptable props. The only workaround is to pass a react component instead of an action.

Reduced test case

https://codesandbox.io/s/sleepy-dhawan-h9nt2n?file=/App.tsx

Specifications

  • Are you using the React components? (Y/N): Y
  • Polaris version number: 12

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions