feat(runtime): Add "data-testid" attributes to UI nodes (#42)

This commit is contained in:
Eric Tuvesson
2024-06-26 21:08:01 +02:00
committed by GitHub
parent 0ee55c26eb
commit fa282d6169
18 changed files with 129 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ export interface ImageProps extends Noodl.ReactProps {
src: string;
onLoad?: () => void;
};
attrs: React.Attributes;
}
export function Image(props: ImageProps) {
@@ -30,5 +31,5 @@ export function Image(props: ImageProps) {
}
}
return <img className={props.className} {...props.dom} {...PointerListeners(props)} style={style} />;
return <img {...props.attrs} className={props.className} {...props.dom} {...PointerListeners(props)} style={style} />;
}