Skip to content

Commit

Permalink
remove deprecated rx.input.root
Browse files Browse the repository at this point in the history
  • Loading branch information
masenf committed Sep 20, 2024
1 parent a706720 commit a338cfb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
.env
.web
__pycache__/
uploaded_files
assets/external/
uploaded_files
31 changes: 13 additions & 18 deletions rx_shout/components/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ def handle_submit(self, form_dict):
def edit_topic_view() -> rx.Component:
return rx.form.root(
rx.hstack(
rx.input.root(
rx.input(
rx.input.slot(rx.icon("pencil", size=20)),
rx.input(
placeholder="Edit topic description...",
default_value=State.topic.description,
id="topic_description",
),
placeholder="Edit topic description...",
default_value=State.topic.description,
id="topic_description",
width="100%",
),
rx.icon_button(rx.icon("save")),
Expand Down Expand Up @@ -101,20 +99,16 @@ def submission_form() -> rx.Component:
rx.form(
rx.vstack(
rx.hstack(
rx.input.root(
rx.input(
rx.input.slot(rx.icon("user", size=20)),
rx.input(
value=UserInfoState.user_info.author.name,
read_only=True,
),
value=UserInfoState.user_info.author.name,
read_only=True,
width="100%",
),
rx.input.root(
rx.input(
rx.input.slot(rx.icon("at_sign", size=20)),
rx.input(
value=UserInfoState.user_info.email,
read_only=True,
),
value=UserInfoState.user_info.email,
read_only=True,
width="100%",
),
rx.icon_button(
Expand All @@ -125,9 +119,10 @@ def submission_form() -> rx.Component:
),
width="100%",
),
rx.input.root(
rx.input(
rx.input.slot(rx.icon("text", size=20)),
rx.input(placeholder="Enter text here...", id="text"),
placeholder="Enter text here...",
id="text",
width="100%",
),
image_upload_component(),
Expand Down

0 comments on commit a338cfb

Please sign in to comment.