Skip to content

Commit 1ac0a2d

Browse files
aaronshafHerrTopi
authored andcommitted
fix(ui-alerts): sotp passing onDismiss to div in Alert
The Alert component accepts onDismiss, but it's passing this down to a div element that doesn't recognize it, which is causing the warning.
1 parent 82b2129 commit 1ac0a2d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/ui-alerts/src/Alert/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ class Alert extends Component<AlertProps, AlertState> {
258258
}
259259

260260
renderAlert() {
261-
const { margin, styles, children, ...props } = this.props
261+
// prevent onDismiss from being passed to the View component
262+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
263+
const { margin, styles, children, onDismiss, ...props } = this.props
262264
return (
263265
<View
264266
{...passthroughProps({ ...props })}

0 commit comments

Comments
 (0)