Skip to content

[RFC][material-ui][Alert] Revise action, icon, and iconMappings props #40680

@DiegoAndai

Description

@DiegoAndai

What's the problem?

The action, icon, and iconMappings props could use a revision:

  • They don't have respective slots
  • Seems arbitrary that icon is to the left and action to the right
  • iconMapping might be better handled via slots

What are the requirements?

Revise the API, comparing with the rest of components, and deciding whether it's still the best option or if it needs an update.

What are our options?

  • Leave as is
  • Implement something similar to Joy UI

Proposed solution

Implement something similar to Joy UI: deprecate and eventually remove action and icon in favor of startDecorator and endDecorator, each with a corresponding slot like Joy UI. The slots receive the ownerState so they can be used to replace iconMappings.

Resources and benchmarks

Search keywords:

Metadata

Metadata

Assignees

Labels

RFCRequest For Comments.scope: alertThis is the name of the generic UI component, not the React module!

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions