We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a82c7d commit da26384Copy full SHA for da26384
src/Alert.tsx
@@ -32,6 +32,7 @@ export type AlertProps = {
32
closable?: boolean;
33
/** To provide if you want the Alert to be controlled */
34
isClosed?: boolean;
35
+ role?: "alert" | "status";
36
onClose?: () => void;
37
} & (AlertProps.DefaultSize | AlertProps.Small);
38
@@ -73,6 +74,7 @@ export const Alert = memo(
73
74
closable: isClosableByUser = false,
75
isClosed: props_isClosed,
76
onClose,
77
+ role = "alert",
78
...rest
79
} = props;
80
@@ -145,7 +147,7 @@ export const Alert = memo(
145
147
className
146
148
)}
149
style={style}
- {...(refShouldSetRole.current && { "role": "alert" })}
150
+ {...(refShouldSetRole.current && { "role": role })}
151
ref={ref}
152
{...rest}
153
>
0 commit comments