-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Open
Labels
scope: alertChanges related to the alert.Changes related to the alert.type: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.waiting for 👍Waiting for upvotes. Open for community feedback and needs more interest to be worked on.Waiting for upvotes. Open for community feedback and needs more interest to be worked on.
Description
Summary
The current iconMapping
prop on the Alert only supports passing in severity
.
A nested iconMapping
prop could enable passing in both severity
and variant
.
Examples

...
iconMapping: {
success: {
filled: CheckmarkOutline,
outlined: Checkmark,
standard: Checkmark,
},
info: {
filled: InfoOutline,
outlined: Info,
standard: Info,
},
warning: {
filled: AlertOutline,
outlined: Alert,
standard: Alert,
},
error: {
filled: ErrorOutline,
outlined: Error,
standard: Error,
},
},
...
<IconSlot {...iconSlotProps}>
{icon || iconMapping[severity][variant] || iconMapping[severity] || defaultIconMapping[severity]}
</IconSlot>
Motivation
I'm trying to use only themeOverrides to fully theme the Alerts we have designed, including the icons.
Search keywords: alert, icon, iconMapping, variant
raphaelaleixo, racheldallaire, karenforda2, bpalomino5 and Hans592
Metadata
Metadata
Assignees
Labels
scope: alertChanges related to the alert.Changes related to the alert.type: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.waiting for 👍Waiting for upvotes. Open for community feedback and needs more interest to be worked on.Waiting for upvotes. Open for community feedback and needs more interest to be worked on.