chore(ui): switch to column render for navbar icons with only 1 filter

This commit is contained in:
Łukasz Mierzwa
2019-07-19 16:25:46 +01:00
parent 6e5f4d2ef7
commit 559870b861
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -109,11 +109,11 @@ const NavBar = observer(
render() {
const { alertStore, settingsStore, silenceFormStore } = this.props;
// if we have at least 2 filters then it's likely that filter input will
// if we have at least 1 filter then it's likely that filter input will
// use 2 lines, so set right side icons on small screeens to column mode
// for more compact layout
const flexClass =
alertStore.filters.values.length >= 2
alertStore.filters.values.length >= 1
? "flex-column flex-sm-column flex-md-row flex-lg-row flex-xl-row"
: "flex-row";
+1 -1
View File
@@ -64,7 +64,7 @@ describe("<NavBar />", () => {
});
it("navbar-nav includes 'flex-row' class with 1 filter", () => {
ValidateNavClass(1, "flex-row");
ValidateNavClass(1, "flex-column");
});
it("navbar-nav includes 'flex-column' class with 2 filters", () => {