From c3ca7ec69146fd4a2ed5e8d336670685e4c2740e Mon Sep 17 00:00:00 2001 From: Michael Haglund Date: Fri, 17 Jan 2020 17:35:23 -0600 Subject: [PATCH] react-imgix: support data attributes as htmlAttributes (#41696) --- types/react-imgix/index.d.ts | 2 +- types/react-imgix/react-imgix-tests.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/react-imgix/index.d.ts b/types/react-imgix/index.d.ts index 880c5f3b57..1b0a60449c 100644 --- a/types/react-imgix/index.d.ts +++ b/types/react-imgix/index.d.ts @@ -204,7 +204,7 @@ interface AttributeConfig { sizes?: string; } -type ImgixHTMLAttributes = React.ImgHTMLAttributes | React.SourceHTMLAttributes; +type ImgixHTMLAttributes = React.ImgHTMLAttributes | React.SourceHTMLAttributes | Record; interface CommonProps { className?: string; diff --git a/types/react-imgix/react-imgix-tests.tsx b/types/react-imgix/react-imgix-tests.tsx index 38d6b36e3c..83e3023c93 100644 --- a/types/react-imgix/react-imgix-tests.tsx +++ b/types/react-imgix/react-imgix-tests.tsx @@ -16,6 +16,7 @@ const ImgixTest = () => ( className="lazyload" htmlAttributes={{ src: '...', + 'data-testid': 'testid', }} /> );