react-imgix: support data attributes as htmlAttributes (#41696)

This commit is contained in:
Michael Haglund
2020-01-17 18:35:23 -05:00
committed by Eli Barzilay
parent 73ed5e28da
commit c3ca7ec691
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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;
+1
View File
@@ -16,6 +16,7 @@ const ImgixTest = () => (
className="lazyload"
htmlAttributes={{
src: '...',
'data-testid': 'testid',
}}
/>
);