Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix padding style in textarea #4696

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions reflex/components/radix/themes/components/text_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,17 @@ def create(cls, *children, **props) -> Component:
return DebounceInput.create(super().create(*children, **props))
return super().create(*children, **props)

def add_style(self):
"""Add the style to the component.

Returns:
The style of the component.
"""
added_style: dict[str, dict] = {}
added_style.setdefault("& textarea", {})
if "padding" in self.style:
added_style["& textarea"]["padding"] = self.style.pop("padding")
return added_style


text_area = TextArea.create
2 changes: 2 additions & 0 deletions reflex/components/radix/themes/components/text_area.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,6 @@ class TextArea(RadixThemesComponent, elements.Textarea):
"""
...

def add_style(self): ...

text_area = TextArea.create
Loading