Browse Source

Fix docstrings and comments for Box and Card components (#2385)

Masen Furer 1 year ago
parent
commit
6b6f3ae0be

+ 3 - 3
reflex/components/radix/themes/components/card.py

@@ -11,15 +11,15 @@ from ..base import (
 
 
 class Card(el.Div, CommonMarginProps, RadixThemesComponent):
-    """Trigger an action or event, such as submitting a form or displaying a dialog."""
+    """Container that groups related content and actions."""
 
     tag = "Card"
 
     # Change the default rendered element for the one passed as a child, merging their props and behavior.
     as_child: Var[bool]
 
-    # Button size "1" - "5"
+    # Card size: "1" - "5"
     size: Var[Literal["1", "2", "3", "4", "5"]]
 
-    # Variant of button: "solid" | "soft" | "outline" | "ghost"
+    # Variant of Card: "solid" | "soft" | "outline" | "ghost"
     variant: Var[Literal["surface", "classic", "ghost"]]

+ 2 - 2
reflex/components/radix/themes/components/card.pyi

@@ -241,8 +241,8 @@ class Card(el.Div, CommonMarginProps, RadixThemesComponent):
             color: map to CSS default color property.
             color_scheme: map to radix color property.
             as_child: Change the default rendered element for the one passed as a child, merging their props and behavior.
-            size: Button size "1" - "5"
-            variant: Variant of button: "solid" | "soft" | "outline" | "ghost"
+            size: Card size: "1" - "5"
+            variant: Variant of Card: "solid" | "soft" | "outline" | "ghost"
             access_key:  Provides a hint for generating a keyboard shortcut for the current element.
             auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
             content_editable: Indicates whether the element's content is editable.

+ 1 - 1
reflex/components/radix/themes/layout/box.py

@@ -7,6 +7,6 @@ from .base import LayoutComponent
 
 
 class Box(el.Div, LayoutComponent):
-    """A fundamental layout building block, based on <div>."""
+    """A fundamental layout building block, based on `div` element."""
 
     tag = "Box"