Skip to content

Commit

Permalink
fix padding style in textarea (#4696)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lendemor authored Jan 29, 2025
1 parent b8b3f89 commit 96ead07
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
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

0 comments on commit 96ead07

Please sign in to comment.