Skip to content

Commit

Permalink
style: UI
Browse files Browse the repository at this point in the history
  • Loading branch information
nlatipov committed Sep 5, 2022
1 parent cd0d35d commit 30dacd9
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const FilterGroup = ({
conditionType,
path,
timeRangeForSuggestionsOverride,
reverseBackground = true,
reverseBackground = false,
}: FilterGroupProps) => {
const {
globalParams: { maxDepth, hideOr },
Expand All @@ -98,7 +98,15 @@ export const FilterGroup = ({
const andDisabled = isDepthReached && conditionType === ConditionTypes.OR;
const removeDisabled = pathInArray.length <= 1 && filters.length === 1;
const isRootLevelFilterGroup = pathInArray.length <= 1;
const color = (isRootLevelFilterGroup && path !== '') || !reverseBackground ? 'plain' : 'subdued';

const firstLevel = !path && filters.length === 1;
let color: 'subdued' | 'plain' = 'subdued';

if (!firstLevel) {
color = !reverseBackground ? 'subdued' : 'plain';
} else {
reverseBackground = true;
}

const shouldDrawBorder = (filter: Filter) =>
(path === '' && isOrFilter(filter) && filters.length !== 1) ||
Expand Down

0 comments on commit 30dacd9

Please sign in to comment.