Skip to content

Commit 6bbc6f5

Browse files
authored
fix(typing): Bug fixes in the the typings
1 parent 35f757e commit 6bbc6f5

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/index.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
import * as React from "react";
22

3-
export interface ProgressiveImageProps extends React.HTMLProps<HTMLDivElement> {
4-
preview: string;
5-
src: string;
6-
}
3+
type DivProps = React.HTMLProps<HTMLImageElement>;
4+
type ImageProps = React.HTMLProps<HTMLDivElement>;
75

8-
export interface ProgressiveBackgroundImageProps extends React.HTMLProps<HTMLImageElement> {
6+
export interface ProgressiveImageProps {
97
preview: string;
108
src: string;
11-
background: boolean;
9+
background?: boolean;
1210
}
1311

1412
export interface ProgressiveImageState {
1513
src: string;
1614
blur: number;
1715
}
1816

19-
export class ProgressiveImage extends React.Component<ProgressiveImageProps & ProgressiveBackgroundImageProps, ProgressiveImageState> {
17+
export class ProgressiveImage extends React.Component<ProgressiveImageProps & DivProps & ImageProps, ProgressiveImageState> {
2018

2119
private clonedProps: React.HTMLProps<HTMLDivElement | HTMLImageElement> = {};
2220

@@ -72,4 +70,4 @@ export class ProgressiveImage extends React.Component<ProgressiveImageProps & Pr
7270
animationTimingFunction: "ease"
7371
};
7472
}
75-
}
73+
}

0 commit comments

Comments
 (0)