From 59af0efc8f1a2390f01e405562bd18cf6c6fbc38 Mon Sep 17 00:00:00 2001 From: Gert Hengeveld Date: Mon, 11 Mar 2024 15:27:20 +0100 Subject: [PATCH] Fix snapshot opacity --- src/components/SnapshotImage.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/SnapshotImage.tsx b/src/components/SnapshotImage.tsx index 041235c7..084b6f41 100644 --- a/src/components/SnapshotImage.tsx +++ b/src/components/SnapshotImage.tsx @@ -113,7 +113,6 @@ export const SnapshotImage = ({ alt={`Latest snapshot for the '${storyName}' story of the '${componentName}' component`} src={latestImage.imageUrl} style={{ - opacity: showDiff && !showFocus ? 0.7 : 1, display: baselineImageVisible ? "none" : "block", }} /> @@ -123,7 +122,6 @@ export const SnapshotImage = ({ alt={`Baseline snapshot for the '${storyName}' story of the '${componentName}' component`} src={baselineImage.imageUrl} style={{ - opacity: showDiff && !showFocus ? 0.7 : 1, display: baselineImageVisible ? "block" : "none", }} /> @@ -135,7 +133,7 @@ export const SnapshotImage = ({ src={diffImage.imageUrl} style={{ maxWidth: `${(diffImage.imageWidth / latestImage.imageWidth) * 100}%`, - opacity: showDiff ? 1 : 0, + opacity: showDiff ? 0.7 : 0, }} /> )} @@ -146,7 +144,7 @@ export const SnapshotImage = ({ src={focusImage.imageUrl} style={{ maxWidth: `${(focusImage.imageWidth / latestImage.imageWidth) * 100}%`, - opacity: showFocus ? 1 : 0, + opacity: showFocus ? 0.7 : 0, filter: showFocus ? "blur(2px)" : "none", }} />