generated from deco-sites/storefront
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e091b74
commit b2609cb
Showing
9 changed files
with
155 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,34 @@ | ||
import Searchbar, { | ||
Props as SearchbarProps, | ||
} from "$store/components/search/Searchbar.tsx"; | ||
import DesktopSearchbar from "$store/components/search/DesktopSearchbar.tsx"; | ||
import { useUI } from "$store/sdk/useUI.ts"; | ||
|
||
export interface Props { | ||
searchbar?: SearchbarProps; | ||
type?: "mobile" | "desktop"; | ||
} | ||
|
||
function SearchbarModal({ searchbar }: Props) { | ||
function SearchbarModal({ searchbar, type = "desktop" }: Props) { | ||
const { displaySearchPopup } = useUI(); | ||
|
||
if (!searchbar || !displaySearchPopup.value) { | ||
if (!searchbar) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div class="block border-y border-base-200 shadow absolute left-0 top-[100%] w-screen z-50 bg-base-100"> | ||
<Searchbar {...searchbar} /> | ||
</div> | ||
); | ||
if (type === "mobile") { | ||
return ( | ||
<> | ||
{displaySearchPopup.value && ( | ||
<div class="fixed bg-base-100 container h-auto z-[99999]"> | ||
<Searchbar {...searchbar} /> | ||
</div> | ||
)} | ||
</> | ||
); | ||
} | ||
|
||
return <DesktopSearchbar {...searchbar} />; | ||
} | ||
|
||
export default SearchbarModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export const navbarHeight = "58px"; | ||
export const menuMarginTop = "75px"; | ||
export const navbarHeight = "75px"; | ||
export const menuMarginTop = "40px"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.