mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
react-imgix: support data attributes as htmlAttributes (#41696)
This commit is contained in:
committed by
Eli Barzilay
parent
73ed5e28da
commit
c3ca7ec691
Vendored
+1
-1
@@ -204,7 +204,7 @@ interface AttributeConfig {
|
||||
sizes?: string;
|
||||
}
|
||||
|
||||
type ImgixHTMLAttributes = React.ImgHTMLAttributes<HTMLImageElement> | React.SourceHTMLAttributes<HTMLSourceElement>;
|
||||
type ImgixHTMLAttributes = React.ImgHTMLAttributes<HTMLImageElement> | React.SourceHTMLAttributes<HTMLSourceElement> | Record<string, string>;
|
||||
|
||||
interface CommonProps {
|
||||
className?: string;
|
||||
|
||||
@@ -16,6 +16,7 @@ const ImgixTest = () => (
|
||||
className="lazyload"
|
||||
htmlAttributes={{
|
||||
src: '...',
|
||||
'data-testid': 'testid',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user