File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ declare module 'react-cloudimage-responsive' {
2+
3+ type Params = string | Record < string , string > ;
4+
5+ export interface CloudimageProviderConfig {
6+ token : string ;
7+ baseURL ?: string ;
8+ doNotReplaceURL ?: boolean ;
9+ lazyLoading ?: boolean ;
10+ lazyLoadOffset ?: number ;
11+ params ?: Params ;
12+ placeholderBackground ?: string ;
13+ lowQualityPreview ?: {
14+ minImgWidth : number ;
15+ }
16+ presets ?: Record < string , string > ;
17+ limitFactor ?: number ;
18+ devicePixelRatioList ?: number [ ] ;
19+ delay ?: number ;
20+ }
21+
22+ class CloudimageProvider extends React . Component < { config : CloudimageProviderConfig } > { }
23+
24+ interface ImgProps {
25+ src : string ;
26+ width ?: string ;
27+ height ?: string ;
28+ params ?: Params ;
29+ sizes ?: Record < string , any > ;
30+ ratio ?: number ;
31+ lazyLoading ?: boolean ;
32+ lazyLoadConfig ?: Record < string , any > ;
33+ }
34+
35+ class BackgroundImg extends React . Component < ImgProps & React . ComponentProps < 'img' > > { }
36+
37+ export default class Img extends React . Component < ImgProps & React . ComponentProps < 'img' > > { }
38+
39+ }
Original file line number Diff line number Diff line change 3131 " crop" ,
3232 " resize"
3333 ],
34+ "types" : " ./index.d.ts" ,
3435 "scripts" : {
3536 "start-demo" : " webpack-dev-server --mode development --config webpack-demo.config.js" ,
3637 "dist" : " rm -rf dist && babel src -d dist --copy-files" ,
You can’t perform that action at this time.
0 commit comments