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:
@@ -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
|
||||
> {}
|
||||
|
||||
Reference in New Issue
Block a user