fix(ui): extend FieldLabelProps with native div element props
FieldLabel renders a div and spreads restProps onto it, but FieldLabelProps 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:
@@ -45,4 +45,6 @@ export type FieldLabelOwnProps = {
|
||||
};
|
||||
|
||||
/** @public */
|
||||
export interface FieldLabelProps extends FieldLabelOwnProps {}
|
||||
export interface FieldLabelProps
|
||||
extends FieldLabelOwnProps,
|
||||
Omit<React.ComponentPropsWithoutRef<'div'>, keyof FieldLabelOwnProps> {}
|
||||
|
||||
Reference in New Issue
Block a user