LabelFilters: Remove redundant css styling (#56653)

* LabelFilters: Remove redundant css

* Remove unused import
This commit is contained in:
Ivana Huckova
2022-10-10 17:59:13 +02:00
committed by GitHub
parent 0696cd3549
commit 3e856da2e4
@@ -1,4 +1,3 @@
import { css } from '@emotion/css';
import { uniqBy } from 'lodash';
import React, { useState } from 'react';
@@ -58,16 +57,6 @@ export function LabelFilterItem({
return uniqBy([...selectedOptions, ...labelValues], 'value');
};
/**
* !important here is necessary to show invalid border on all 4 sides of select.
* Without it, the invalid state is only visible on 3 sides as the right side is overridden in InputGroup.
*/
const invalidClassNameOverride = invalidLabel
? css`
margin-left: 0 !important;
`
: '';
return (
<div data-testid="prometheus-dimensions-filter-item">
<InputGroup>
@@ -107,7 +96,6 @@ export function LabelFilterItem({
onChange({ ...item, op: change.value } as any as QueryBuilderLabelFilter);
}
}}
className={invalidClassNameOverride}
/>
<Select