mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
react-imgix: support data attributes as htmlAttributes (#41696)
This commit is contained in:
parent
73ed5e28da
commit
c3ca7ec691
2
types/react-imgix/index.d.ts
vendored
2
types/react-imgix/index.d.ts
vendored
@ -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',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user