fix padding style in textarea (#4696)

This commit is contained in:
Thomas Brandého 2025-01-29 07:53:40 +01:00 committed by GitHub
parent b8b3f8910e
commit 96ead07606
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -96,5 +96,17 @@ class TextArea(RadixThemesComponent, elements.Textarea):
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

View File

@ -268,4 +268,6 @@ class TextArea(RadixThemesComponent, elements.Textarea):
"""
...
def add_style(self): ...
text_area = TextArea.create