Skip to content

Commit d36f785

Browse files
committed
Fix docs warning sources
1 parent 2c75ec9 commit d36f785

9 files changed

Lines changed: 45 additions & 41 deletions

File tree

docs/ai_builder/features/ide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import reflex as rx
99
```python eval
1010
rx.el.div(
1111
rx.video(
12-
url="https://www.youtube.com/embed/UAj9vUweQ5g",
12+
src="https://www.youtube.com/embed/UAj9vUweQ5g",
1313
width="100%",
1414
height="400px",
1515
),

docs/getting_started/introduction.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ tabs()
119119

120120
```python demo box
121121
rx.box(
122-
rx._x.code_block(
122+
rx.code_block(
123123
"""import reflex as rx """,
124124
class_name="code-block !bg-transparent !border-none",
125125
),
126-
rx._x.code_block(
126+
rx.code_block(
127127
"""class State(rx.State):
128128
count: int = 0
129129
@@ -146,7 +146,7 @@ rx.box(
146146
),
147147
class_name="code-block",
148148
),
149-
rx._x.code_block(
149+
rx.code_block(
150150
"""def index():
151151
return rx.hstack(
152152
rx.button(
@@ -174,7 +174,7 @@ rx.box(
174174
),
175175
class_name="code-block",
176176
),
177-
rx._x.code_block(
177+
rx.code_block(
178178
"""app = rx.App()
179179
app.add_page(index)""",
180180
background=rx.cond(

docs/library/forms/form-ll.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ In this example, the `rx.input` has an attribute `type="email"` and the `form.me
143143
## Form Anatomy
144144

145145
```python eval
146-
rx._x.code_block(
146+
rx.code_block(
147147
"""form.root(
148148
form.field(
149149
form.label(...),

docs/recipes/auth/login_form.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ def login_single_thirdparty() -> rx.Component:
232232
width="100%",
233233
),
234234
rx.button(
235-
rx.icon(tag="github"),
236-
"Sign in with Github",
235+
rx.text("GH", weight="bold"),
236+
"Sign in with GitHub",
237237
variant="outline",
238238
size="3",
239239
width="100%",
@@ -318,9 +318,9 @@ def login_multiple_thirdparty() -> rx.Component:
318318
width="100%",
319319
),
320320
rx.center(
321-
rx.icon_button(rx.icon(tag="github"), variant="soft", size="3"),
322-
rx.icon_button(rx.icon(tag="facebook"), variant="soft", size="3"),
323-
rx.icon_button(rx.icon(tag="twitter"), variant="soft", size="3"),
321+
rx.icon_button(rx.text("GH", weight="bold"), variant="soft", size="3"),
322+
rx.icon_button(rx.text("f", weight="bold"), variant="soft", size="3"),
323+
rx.icon_button(rx.text("X", weight="bold"), variant="soft", size="3"),
324324
spacing="4",
325325
direction="row",
326326
width="100%",

docs/recipes/auth/signup_form.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ def signup_single_thirdparty() -> rx.Component:
257257
width="100%",
258258
),
259259
rx.button(
260-
rx.icon(tag="github"),
261-
"Sign in with Github",
260+
rx.text("GH", weight="bold"),
261+
"Sign in with GitHub",
262262
variant="outline",
263263
size="3",
264264
width="100%",
@@ -351,9 +351,9 @@ def signup_multiple_thirdparty() -> rx.Component:
351351
width="100%",
352352
),
353353
rx.center(
354-
rx.icon_button(rx.icon(tag="github"), variant="soft", size="3"),
355-
rx.icon_button(rx.icon(tag="facebook"), variant="soft", size="3"),
356-
rx.icon_button(rx.icon(tag="twitter"), variant="soft", size="3"),
354+
rx.icon_button(rx.text("GH", weight="bold"), variant="soft", size="3"),
355+
rx.icon_button(rx.text("f", weight="bold"), variant="soft", size="3"),
356+
rx.icon_button(rx.text("X", weight="bold"), variant="soft", size="3"),
357357
spacing="4",
358358
direction="row",
359359
width="100%",

docs/recipes/layout/footer.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ def footer_items_2() -> rx.Component:
4141
)
4242

4343

44-
def social_link(icon: str, href: str) -> rx.Component:
45-
return rx.link(rx.icon(icon), href=href)
44+
def social_link(label: str, href: str) -> rx.Component:
45+
return rx.link(rx.text(label, weight="bold"), href=href)
4646

4747

4848
def socials() -> rx.Component:
4949
return rx.flex(
50-
social_link("instagram", "/#"),
51-
social_link("twitter", "/#"),
52-
social_link("facebook", "/#"),
53-
social_link("linkedin", "/#"),
50+
social_link("IG", "/#"),
51+
social_link("X", "/#"),
52+
social_link("f", "/#"),
53+
social_link("in", "/#"),
5454
spacing="3",
5555
justify="end",
5656
width="100%",
@@ -143,16 +143,16 @@ def footer_items_2() -> rx.Component:
143143
)
144144

145145

146-
def social_link(icon: str, href: str) -> rx.Component:
147-
return rx.link(rx.icon(icon), href=href)
146+
def social_link(label: str, href: str) -> rx.Component:
147+
return rx.link(rx.text(label, weight="bold"), href=href)
148148

149149

150150
def socials() -> rx.Component:
151151
return rx.flex(
152-
social_link("instagram", "/#"),
153-
social_link("twitter", "/#"),
154-
social_link("facebook", "/#"),
155-
social_link("linkedin", "/#"),
152+
social_link("IG", "/#"),
153+
social_link("X", "/#"),
154+
social_link("f", "/#"),
155+
social_link("in", "/#"),
156156
spacing="3",
157157
justify_content=["center", "center", "end"],
158158
width="100%",
@@ -268,16 +268,16 @@ def footer_items_3() -> rx.Component:
268268
)
269269

270270

271-
def social_link(icon: str, href: str) -> rx.Component:
272-
return rx.link(rx.icon(icon), href=href)
271+
def social_link(label: str, href: str) -> rx.Component:
272+
return rx.link(rx.text(label, weight="bold"), href=href)
273273

274274

275275
def socials() -> rx.Component:
276276
return rx.flex(
277-
social_link("instagram", "/#"),
278-
social_link("twitter", "/#"),
279-
social_link("facebook", "/#"),
280-
social_link("linkedin", "/#"),
277+
social_link("IG", "/#"),
278+
social_link("X", "/#"),
279+
social_link("f", "/#"),
280+
social_link("in", "/#"),
281281
spacing="3",
282282
justify_content=["center", "center", "end"],
283283
width="100%",

docs/wrapping-react/overview.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ We also have a var `color` which is the current color of the color picker.
5858
Since this component has interaction we must specify any event triggers that the component takes. The color picker has a single trigger `on_change` to specify when the color changes. This trigger takes in a single argument `color` which is the new color.
5959

6060
```python exec
61+
from reflex.experimental.client_state import ClientStateVar
6162
from reflex.components.component import NoSSRComponent
6263

6364

@@ -70,7 +71,7 @@ class ColorPicker(NoSSRComponent):
7071

7172
color_picker = ColorPicker.create
7273

73-
ColorPickerState = rx._x.client_state(default="#db114b", var_name="color")
74+
ColorPickerState = ClientStateVar.create(default="#db114b", var_name="color")
7475
```
7576

7677
```python eval

packages/reflex-site-shared/src/reflex_site_shared/components/blocks/code.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Code block components for documentation pages."""
22

3+
from reflex_components_code.shiki_code_block import code_block as shiki_code_block
4+
35
import reflex as rx
46
import reflex_site_shared.styles.fonts as fonts
57
from reflex_site_shared import styles
@@ -16,7 +18,7 @@ def _plain_code_block(code: str, language: str):
1618
The component.
1719
"""
1820
return rx.box(
19-
rx._x.code_block(
21+
shiki_code_block(
2022
code,
2123
language=language,
2224
class_name="code-block",
@@ -88,7 +90,7 @@ def code_block_dark(code: str, language: str):
8890
The component.
8991
"""
9092
return rx.box(
91-
rx._x.code_block(
93+
shiki_code_block(
9294
code,
9395
language=language,
9496
class_name="code-block",
@@ -132,7 +134,7 @@ def doccmdoutput(
132134
The styled command and its example output.
133135
"""
134136
return rx.vstack(
135-
rx._x.code_block(
137+
shiki_code_block(
136138
command,
137139
can_copy=True,
138140
border_radius=styles.DOC_BORDER_RADIUS,
@@ -148,7 +150,7 @@ def doccmdoutput(
148150
font_family="JetBrains Mono",
149151
width="100%",
150152
),
151-
rx._x.code_block(
153+
shiki_code_block(
152154
output,
153155
can_copy=False,
154156
border_radius="12px",

packages/reflex-site-shared/src/reflex_site_shared/components/blocks/flexdown.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# pyright: reportAttributeAccessIssue=false
44
from reflex_base.constants.colors import ColorType
5+
from reflex_components_code.shiki_code_block import code_block as shiki_code_block
56

67
import reflex as rx
78
from reflex_site_shared.components.blocks.code import (
@@ -139,12 +140,12 @@ def markdown_codeblock(value: str, **props: object) -> rx.Component:
139140
Returns:
140141
The component.
141142
"""
142-
return rx._x.code_block(value, **props)
143+
return shiki_code_block(value, **props)
143144

144145

145146
def markdown_with_shiki(*args, **kwargs):
146147
"""Wrapper for the markdown component with a customized component map.
147-
Uses the experimental Shiki-based code block (rx._x.code_block)
148+
Uses the Shiki-based code block
148149
instead of the default CodeBlock component for code blocks.
149150
150151
Note: This wrapper should be removed once the default codeblock

0 commit comments

Comments
 (0)