@chakra-ui/image
Version:
React component for progressive image loading
1 lines • 1.04 kB
Source Map (JSON)
{"version":3,"sources":["../src/native-image.tsx"],"sourcesContent":["import { PropsOf, forwardRef } from \"@chakra-ui/system\"\n\nexport interface NativeImageOptions {\n /**\n * The native HTML `width` attribute to the passed to the `img`\n */\n htmlWidth?: string | number\n /**\n * The native HTML `height` attribute to the passed to the `img`\n */\n htmlHeight?: string | number\n}\n\ninterface NativeImageProps extends PropsOf<\"img\">, NativeImageOptions {}\n\nexport const NativeImage = forwardRef(function NativeImage(\n props: NativeImageProps,\n ref: React.Ref<any>,\n) {\n const { htmlWidth, htmlHeight, alt, ...rest } = props\n return (\n <img width={htmlWidth} height={htmlHeight} ref={ref} alt={alt} {...rest} />\n )\n})\n\nNativeImage.displayName = \"NativeImage\"\n"],"mappings":";;;AAAA,SAAkB,kBAAkB;AAqBhC;AANG,IAAM,cAAc,WAAW,SAASA,aAC7C,OACA,KACA;AACA,QAAM,EAAE,WAAW,YAAY,KAAK,GAAG,KAAK,IAAI;AAChD,SACE,oBAAC,SAAI,OAAO,WAAW,QAAQ,YAAY,KAAU,KAAW,GAAG,MAAM;AAE7E,CAAC;AAED,YAAY,cAAc;","names":["NativeImage"]}