-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.d.ts
40 lines (33 loc) · 1.03 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
declare module 'react-cloudimage-responsive' {
type Params = string | Record<string, string>;
export interface CloudimageProviderConfig {
token: string;
baseURL?: string;
doNotReplaceURL?: boolean;
lazyLoading?: boolean;
lazyLoadOffset?: number;
params?: Params;
placeholderBackground?: string;
lowQualityPreview?: {
minImgWidth: number;
}
presets?: Record<string, string>;
limitFactor?: number;
devicePixelRatioList?: number[];
delay?: number;
}
class CloudimageProvider extends React.Component<{ config: CloudimageProviderConfig }> { }
interface ImgProps {
src: string;
width?: string;
height?: string;
params?: Params;
sizes?: Record<string, any>;
ratio?: number;
lazyLoading?: boolean;
lazyLoadConfig?: Record<string, any>;
doNotReplaceURL: boolean;
}
class BackgroundImg extends React.Component<ImgProps & React.ComponentProps<'img'>> { }
export default class Img extends React.Component<ImgProps & React.ComponentProps<'img'>> { }
}