mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
chore(ui): use FontAwesome icon instead of 'x' for FilterInputLabel
This commit is contained in:
@@ -8,6 +8,7 @@ import { RIEInput } from "@attently/riek";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { faExclamationCircle } from "@fortawesome/free-solid-svg-icons/faExclamationCircle";
|
||||
import { faSpinner } from "@fortawesome/free-solid-svg-icons/faSpinner";
|
||||
import { faTimes } from "@fortawesome/free-solid-svg-icons/faTimes";
|
||||
|
||||
import { AlertStore } from "Stores/AlertStore";
|
||||
import { QueryOperators } from "Common/Query";
|
||||
@@ -99,12 +100,11 @@ const FilterInputLabel = observer(
|
||||
classEditing="py-0 border-0 bg-light"
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
<span
|
||||
className="close ml-1 align-text-bottom cursor-pointer text-reset"
|
||||
<FontAwesomeIcon
|
||||
className="cursor-pointer text-reset ml-1 close"
|
||||
icon={faTimes}
|
||||
onClick={() => alertStore.filters.removeFilter(filter.raw)}
|
||||
>
|
||||
<span className="text-reset">×</span>
|
||||
</span>
|
||||
/>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -171,7 +171,8 @@ describe("<FilterInputLabel /> onChange", () => {
|
||||
filter={alertStore.filters.values[0]}
|
||||
/>
|
||||
);
|
||||
const button = tree.find(".close");
|
||||
|
||||
const button = tree.find("svg.close");
|
||||
button.simulate("click");
|
||||
expect(alertStore.filters.values).toHaveLength(1);
|
||||
expect(alertStore.filters.values).toContainEqual(
|
||||
|
||||
Reference in New Issue
Block a user