From e8d5715e04fcfcc7012425e5b40507da1681cd35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Mon, 25 Mar 2019 21:24:55 -0700 Subject: [PATCH] fix(ui): use flex for ordering filter elements --- .../Labels/FilterInputLabel/index.css | 2 +- .../Labels/FilterInputLabel/index.js | 48 +++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/ui/src/Components/Labels/FilterInputLabel/index.css b/ui/src/Components/Labels/FilterInputLabel/index.css index 3de3f2cad..97fcc246d 100644 --- a/ui/src/Components/Labels/FilterInputLabel/index.css +++ b/ui/src/Components/Labels/FilterInputLabel/index.css @@ -22,5 +22,5 @@ .badge.components-filteredinputlabel > .close { /* make close button bigger, to match font size of the badge */ - font-size: 1rem; + font-size: 100%; } diff --git a/ui/src/Components/Labels/FilterInputLabel/index.js b/ui/src/Components/Labels/FilterInputLabel/index.js index 9f225b40d..db41f6050 100644 --- a/ui/src/Components/Labels/FilterInputLabel/index.js +++ b/ui/src/Components/Labels/FilterInputLabel/index.js @@ -56,32 +56,18 @@ const FilterInputLabel = observer( f => f.hits !== alertStore.info.totalAlerts ).length > 0; + const rootClasses = filter.applied + ? cs.className + : [ + "badge-secondary components-filteredinputlabel", + ...cs.baseClassNames + ].join(" "); + return ( - {filter.isValid ? ( filter.applied ? ( showCounter ? ( @@ -99,9 +85,9 @@ const FilterInputLabel = observer( )} - + + ); }