Skip to content

Commit 72666d7

Browse files
authored
Merge branch 'main' into carlos/hosting-billing-links
2 parents b9679ae + 42b37cf commit 72666d7

File tree

17 files changed

+552
-505
lines changed

17 files changed

+552
-505
lines changed

docs/library/media/image.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ import requests
4141

4242

4343
class ImageState(rx.State):
44-
url = f"https://picsum.photos/id/1/200/300"
45-
image = Image.open(requests.get(url, stream=True).raw)
44+
url: str = f"https://picsum.photos/id/1/200/300"
45+
image: Image.Image = Image.open(requests.get(url, stream=True).raw)
4646

4747

4848
def image_pil_example():
@@ -59,4 +59,4 @@ A cv2 image must be converted to a PIL image to be passed directly to `rx.image`
5959
```md alert info
6060
# How to let your user upload an image
6161
To let a user upload an image to your app check out the [upload docs]({library.forms.upload.path}).
62-
```
62+
```

errors.md

Lines changed: 0 additions & 208 deletions
This file was deleted.

pcweb/components/docpage/navbar/inkeep.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,17 @@
88
from 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+
"""
4231
const 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

241239
inkeep = Search.create

0 commit comments

Comments
 (0)