Skip to content

Commit 05be15a

Browse files
committed
feat: set possible to override role props on Alert
1 parent 1dc7300 commit 05be15a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Alert.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const Alert = memo(
7474
closable: isClosableByUser = false,
7575
isClosed: props_isClosed,
7676
onClose,
77-
role = "alert",
77+
role,
7878
...rest
7979
} = props;
8080

@@ -148,6 +148,7 @@ export const Alert = memo(
148148
)}
149149
style={style}
150150
{...(refShouldSetRole.current && { "role": role })}
151+
{...(role ? { "role": role } : {})}
151152
ref={ref}
152153
{...rest}
153154
>

0 commit comments

Comments
 (0)