Skip to content
This repository was archived by the owner on Apr 28, 2026. It is now read-only.

Commit b7171c1

Browse files
committed
update styles
1 parent eb9689e commit b7171c1

2 files changed

Lines changed: 29 additions & 7 deletions

File tree

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
"""Search bar component for the navbar."""
22

3+
from typing import Optional
4+
35
import reflex as rx
46

57
from .inkeep import inkeep
68

79

8-
@rx.memo
9-
def search_bar(custom_style: str = "") -> rx.Component:
10-
return inkeep(custom_style=custom_style)
10+
def search_bar(
11+
custom_style: str = "", trigger: Optional[rx.Component] = None
12+
) -> rx.Component:
13+
if trigger is None:
14+
return inkeep(custom_style=custom_style)
15+
16+
return rx.el.div(
17+
trigger,
18+
rx.el.div(
19+
inkeep(custom_style=custom_style),
20+
class_name="absolute inset-0 z-10 opacity-0 overflow-hidden",
21+
),
22+
class_name="relative inline-flex",
23+
)

pcweb/views/marketing_navbar.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,14 +486,23 @@ def navigation_menu() -> rx.Component:
486486
),
487487
ui.navigation_menu.item(
488488
search_bar(
489-
custom_style=".ikp-search-bar__text { display: none !important; } "
490-
"[data-theme='light'] .ikp-search-bar__container, "
491-
"[data-theme='dark'] .ikp-search-bar__container { "
492-
"width: auto !important; max-width: fit-content !important; min-width: fit-content !important; }"
489+
trigger=button(
490+
ui.icon("Search01Icon", class_name="size-4"),
491+
"⌘+K",
492+
size="sm",
493+
variant="ghost",
494+
class_name="group-hover:text-primary-10 dark:group-hover:text-primary-9",
495+
native_button=False,
496+
),
493497
),
498+
class_name="group",
494499
unstyled=True,
495500
custom_attrs={"role": "menuitem"},
496501
),
502+
class_name="flex flex-row gap-2 m-0 h-full list-none items-center",
503+
custom_attrs={"role": "menubar"},
504+
),
505+
ui.navigation_menu.list(
497506
ui.navigation_menu.item(
498507
rx.el.a(
499508
button(

0 commit comments

Comments
 (0)