88from reflex .vars import Var
99
1010
11- class Search (rx .Component ):
12- tag = "SearchBar"
11+ class InkeepSearchBar (rx .NoSSRComponent ):
12+ tag = "InkeepSearchBar"
13+ library = "@inkeep/uikit-js"
1314
14- special_props : List [Var ] = [Var ("{...searchBarProps}" )]
15-
16- is_open : Var [bool ] = False
17-
18- on_close : EventHandler [lambda : []]
19-
20- on_shortcut_key_pressed : EventHandler [lambda : []]
2115
16+ class Search (rx .el .Div ):
2217 class_name : Var [str ] = "max-w-[256px] max-h-[32px]"
2318
2419 def add_imports (self ):
2520 """Add the imports for the component."""
2621 return {
27- "next/dynamic" : {ImportVar (tag = "dynamic" , is_default = True )},
2822 "react" : {ImportVar (tag = "useContext" )},
2923 "$/utils/context" : {ImportVar (tag = "ColorModeContext" )},
3024 }
@@ -33,12 +27,7 @@ def add_hooks(self):
3327 """Add the hooks for the component."""
3428 return [
3529 "const { resolvedColorMode } = useContext(ColorModeContext)" ,
36- """const SearchBar = dynamic(
37- () => import('@inkeep/uikit').then((mod) => mod.InkeepSearchBar),
38- {
39- ssr: false,
40- },
41- );
30+ """
4231const supportFormConfig = {
4332 heading: "Contact support",
4433 fields: [
@@ -237,5 +226,14 @@ def add_hooks(self):
237226};""" ,
238227 ]
239228
229+ @classmethod
230+ def create (cls ):
231+ """Create the search component."""
232+ return super ().create (
233+ InkeepSearchBar .create (
234+ special_props = [Var ("{...searchBarProps}" )],
235+ )
236+ )
237+
240238
241239inkeep = Search .create
0 commit comments