From 0b6d2e036084a1e956769f0823785c019f260ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Mon, 23 Dec 2019 23:25:57 +0000 Subject: [PATCH] fix(ui): tab badge on silence modal is invisible with dark theme --- .../__snapshots__/index.test.js.snap | 18 +++++++++--------- .../SilenceModal/DateTimeSelect/index.js | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ui/src/Components/SilenceModal/DateTimeSelect/__snapshots__/index.test.js.snap b/ui/src/Components/SilenceModal/DateTimeSelect/__snapshots__/index.test.js.snap index 6670002c8..2cd715480 100644 --- a/ui/src/Components/SilenceModal/DateTimeSelect/__snapshots__/index.test.js.snap +++ b/ui/src/Components/SilenceModal/DateTimeSelect/__snapshots__/index.test.js.snap @@ -8,7 +8,7 @@ exports[` 'Duration' tab matches snapshot 1`] = ` Starts - + now @@ -18,7 +18,7 @@ exports[` 'Duration' tab matches snapshot 1`] = ` Ends - + in 366d @@ -28,7 +28,7 @@ exports[` 'Duration' tab matches snapshot 1`] = ` Duration - + 366d @@ -235,7 +235,7 @@ exports[` 'Ends' tab matches snapshot 1`] = ` Starts - + now @@ -245,7 +245,7 @@ exports[` 'Ends' tab matches snapshot 1`] = ` Ends - + in 366d @@ -255,7 +255,7 @@ exports[` 'Ends' tab matches snapshot 1`] = ` Duration - + 366d @@ -688,7 +688,7 @@ exports[` 'Starts' tab matches snapshot 1`] = ` Starts - + now @@ -698,7 +698,7 @@ exports[` 'Starts' tab matches snapshot 1`] = ` Ends - + in 366d @@ -708,7 +708,7 @@ exports[` 'Starts' tab matches snapshot 1`] = ` Duration - + 366d diff --git a/ui/src/Components/SilenceModal/DateTimeSelect/index.js b/ui/src/Components/SilenceModal/DateTimeSelect/index.js index a09a381c9..2049f0671 100644 --- a/ui/src/Components/SilenceModal/DateTimeSelect/index.js +++ b/ui/src/Components/SilenceModal/DateTimeSelect/index.js @@ -18,7 +18,7 @@ const OffsetBadge = ({ startDate, endDate, prefixLabel }) => { const minutes = endDate.diff(startDate, "minutes") % 60; return ( - + {days <= 0 && hours <= 0 && minutes <= 0 ? "now" : prefixLabel} {days > 0 ? `${days}d ` : null} {hours > 0 ? `${hours}h ` : null}