fix(ui): extend AlertProps with native div element props

Alert renders a div and spreads restProps onto it, but
AlertProps didn't extend native div props. This meant
attributes like aria-*, data-*, role, etc. couldn't be
passed with type safety.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
Johan Persson
2026-03-03 14:03:24 +01:00
parent 6edae0e959
commit 68e0cc1468
+7 -1
View File
@@ -34,4 +34,10 @@ export type AlertOwnProps = {
*
* @public
*/
export interface AlertProps extends MarginProps, AlertOwnProps {}
export interface AlertProps
extends MarginProps,
AlertOwnProps,
Omit<
React.ComponentPropsWithoutRef<'div'>,
keyof AlertOwnProps | keyof MarginProps
> {}