We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd37d28 commit 2c3c92eCopy full SHA for 2c3c92e
src/Image/index.tsx
@@ -101,7 +101,7 @@ const imageShowStrategy = ({ lazyLoad, loaded }: State) => {
101
102
export const Image: React.FC<ImagePropTypes> = function ({
103
className,
104
- fadeInDuration,
+ fadeInDuration = 500,
105
intersectionTreshold,
106
intersectionThreshold,
107
intersectionMargin,
@@ -150,8 +150,8 @@ export const Image: React.FC<ImagePropTypes> = function ({
150
);
151
152
const transition =
153
- typeof fadeInDuration === "undefined" || fadeInDuration > 0
154
- ? `opacity ${fadeInDuration || 500}ms ${fadeInDuration || 500}ms`
+ fadeInDuration > 0
+ ? `opacity ${fadeInDuration}ms ${fadeInDuration}ms`
155
: undefined;
156
157
const placeholder = (
0 commit comments