This commit is contained in:
Manav Rathi
2024-09-07 17:04:47 +05:30
parent 980a1f4c5a
commit 60f7282774
2 changed files with 19 additions and 21 deletions

View File

@@ -1,9 +1,11 @@
import { UpdateSearch } from "@/new/photos/services/search/types";
import { EnteFile } from "@/new/photos/types/file";
import { FluidContainer } from "@ente/shared/components/Container";
import SearchIcon from "@mui/icons-material/Search";
import { IconButton } from "@mui/material";
import { Collection } from "types/collection";
import { SearchBarMobile } from "./searchBarMobile";
import { SearchInput } from "./SearchInput";
import { SearchBarWrapper } from "./styledComponents";
import { SearchBarWrapper, SearchMobileBox } from "./styledComponents";
interface Props {
updateSearch: UpdateSearch;
@@ -34,3 +36,18 @@ export default function SearchBar({
</SearchBarWrapper>
);
}
function SearchBarMobile({ show, showSearchInput }) {
if (!show) {
return <></>;
}
return (
<SearchMobileBox>
<FluidContainer justifyContent="flex-end" ml={1.5}>
<IconButton onClick={showSearchInput}>
<SearchIcon />
</IconButton>
</FluidContainer>
</SearchMobileBox>
);
}

View File

@@ -1,19 +0,0 @@
import { FluidContainer } from "@ente/shared/components/Container";
import SearchIcon from "@mui/icons-material/Search";
import { IconButton } from "@mui/material";
import { SearchMobileBox } from "./styledComponents";
export function SearchBarMobile({ show, showSearchInput }) {
if (!show) {
return <></>;
}
return (
<SearchMobileBox>
<FluidContainer justifyContent="flex-end" ml={1.5}>
<IconButton onClick={showSearchInput}>
<SearchIcon />
</IconButton>
</FluidContainer>
</SearchMobileBox>
);
}