Update docstrings for Radix components based on upstream descriptions (#2615)
These are better than copying the generic description of Button in many many many components.
This commit is contained in:
parent
f12746d859
commit
a91987c051
@ -18,7 +18,7 @@ CalloutVariant = Literal["soft", "surface", "outline"]
|
||||
|
||||
|
||||
class CalloutRoot(el.Div, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Groups Icon and Text parts of a Callout."""
|
||||
|
||||
tag = "Callout.Root"
|
||||
|
||||
@ -39,19 +39,19 @@ class CalloutRoot(el.Div, RadixThemesComponent):
|
||||
|
||||
|
||||
class CalloutIcon(el.Div, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Provides width and height for the icon associated with the callout."""
|
||||
|
||||
tag = "Callout.Icon"
|
||||
|
||||
|
||||
class CalloutText(el.P, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Renders the callout text. This component is based on the p element."""
|
||||
|
||||
tag = "Callout.Text"
|
||||
|
||||
|
||||
class Callout(CalloutRoot):
|
||||
"""High level wrapper for the Callout component."""
|
||||
"""A short message to attract user's attention."""
|
||||
|
||||
# The text of the callout.
|
||||
text: Var[str]
|
||||
|
@ -19,7 +19,7 @@ LiteralCheckboxVariant = Literal["classic", "surface", "soft"]
|
||||
|
||||
|
||||
class Checkbox(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Selects a single value, typically for submission in a form."""
|
||||
|
||||
tag = "Checkbox"
|
||||
|
||||
|
@ -12,7 +12,7 @@ from ..base import (
|
||||
|
||||
|
||||
class ContextMenuRoot(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Menu representing a set of actions, displayed at the origin of a pointer right-click or long-press."""
|
||||
|
||||
tag = "ContextMenu.Root"
|
||||
|
||||
@ -34,7 +34,7 @@ class ContextMenuRoot(RadixThemesComponent):
|
||||
|
||||
|
||||
class ContextMenuTrigger(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Wraps the element that will open the context menu."""
|
||||
|
||||
tag = "ContextMenu.Trigger"
|
||||
|
||||
@ -47,7 +47,7 @@ class ContextMenuTrigger(RadixThemesComponent):
|
||||
|
||||
|
||||
class ContextMenuContent(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""The component that pops out when the context menu is open."""
|
||||
|
||||
tag = "ContextMenu.Content"
|
||||
|
||||
@ -86,13 +86,13 @@ class ContextMenuContent(RadixThemesComponent):
|
||||
|
||||
|
||||
class ContextMenuSub(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Contains all the parts of a submenu."""
|
||||
|
||||
tag = "ContextMenu.Sub"
|
||||
|
||||
|
||||
class ContextMenuSubTrigger(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""An item that opens a submenu."""
|
||||
|
||||
tag = "ContextMenu.SubTrigger"
|
||||
|
||||
@ -103,7 +103,7 @@ class ContextMenuSubTrigger(RadixThemesComponent):
|
||||
|
||||
|
||||
class ContextMenuSubContent(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""The component that pops out when a submenu is open."""
|
||||
|
||||
tag = "ContextMenu.SubContent"
|
||||
|
||||
@ -128,7 +128,7 @@ class ContextMenuSubContent(RadixThemesComponent):
|
||||
|
||||
|
||||
class ContextMenuItem(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""The component that contains the context menu items."""
|
||||
|
||||
tag = "ContextMenu.Item"
|
||||
|
||||
@ -142,13 +142,13 @@ class ContextMenuItem(RadixThemesComponent):
|
||||
|
||||
|
||||
class ContextMenuSeparator(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Separates items in a context menu."""
|
||||
|
||||
tag = "ContextMenu.Separator"
|
||||
|
||||
|
||||
class ContextMenu(SimpleNamespace):
|
||||
"""ContextMenu components namespace."""
|
||||
"""Menu representing a set of actions, displayed at the origin of a pointer right-click or long-press."""
|
||||
|
||||
root = staticmethod(ContextMenuRoot.create)
|
||||
trigger = staticmethod(ContextMenuTrigger.create)
|
||||
|
@ -141,7 +141,7 @@ class DropdownMenuContent(RadixThemesComponent):
|
||||
|
||||
|
||||
class DropdownMenuSubTrigger(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""An item that opens a submenu."""
|
||||
|
||||
tag = "DropdownMenu.SubTrigger"
|
||||
|
||||
|
@ -12,7 +12,7 @@ from ..base import (
|
||||
|
||||
|
||||
class HoverCardRoot(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""For sighted users to preview content available behind a link."""
|
||||
|
||||
tag = "HoverCard.Root"
|
||||
|
||||
@ -41,13 +41,13 @@ class HoverCardRoot(RadixThemesComponent):
|
||||
|
||||
|
||||
class HoverCardTrigger(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Wraps the link that will open the hover card."""
|
||||
|
||||
tag = "HoverCard.Trigger"
|
||||
|
||||
|
||||
class HoverCardContent(el.Div, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Contains the content of the open hover card."""
|
||||
|
||||
tag = "HoverCard.Content"
|
||||
|
||||
@ -65,7 +65,7 @@ class HoverCardContent(el.Div, RadixThemesComponent):
|
||||
|
||||
|
||||
class HoverCard(SimpleNamespace):
|
||||
"""HoverCard components namespace."""
|
||||
"""For sighted users to preview content available behind a link."""
|
||||
|
||||
root = __call__ = staticmethod(HoverCardRoot.create)
|
||||
trigger = staticmethod(HoverCardTrigger.create)
|
||||
|
@ -20,7 +20,7 @@ LiteralButtonSize = Literal["1", "2", "3", "4"]
|
||||
|
||||
|
||||
class IconButton(el.Button, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""A button designed specifically for usage with a single icon."""
|
||||
|
||||
tag = "IconButton"
|
||||
|
||||
|
@ -12,7 +12,7 @@ LiteralButtonSize = Literal["1", "2", "3", "4"]
|
||||
|
||||
|
||||
class Inset(el.Div, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Applies a negative margin to allow content to bleed into the surrounding container."""
|
||||
|
||||
tag = "Inset"
|
||||
|
||||
|
@ -12,7 +12,7 @@ from ..base import (
|
||||
|
||||
|
||||
class PopoverRoot(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Floating element for displaying rich content, triggered by a button."""
|
||||
|
||||
tag = "Popover.Root"
|
||||
|
||||
@ -35,13 +35,13 @@ class PopoverRoot(RadixThemesComponent):
|
||||
|
||||
|
||||
class PopoverTrigger(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Wraps the control that will open the popover."""
|
||||
|
||||
tag = "Popover.Trigger"
|
||||
|
||||
|
||||
class PopoverContent(el.Div, RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Contains content to be rendered in the open popover."""
|
||||
|
||||
tag = "Popover.Content"
|
||||
|
||||
@ -81,13 +81,13 @@ class PopoverContent(el.Div, RadixThemesComponent):
|
||||
|
||||
|
||||
class PopoverClose(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Wraps the control that will close the popover."""
|
||||
|
||||
tag = "Popover.Close"
|
||||
|
||||
|
||||
class Popover(SimpleNamespace):
|
||||
"""Popover components namespace."""
|
||||
"""Floating element for displaying rich content, triggered by a button."""
|
||||
|
||||
root = staticmethod(PopoverRoot.create)
|
||||
trigger = staticmethod(PopoverTrigger.create)
|
||||
|
@ -12,7 +12,7 @@ LiteralSeperatorSize = Literal["1", "2", "3", "4"]
|
||||
|
||||
|
||||
class Separator(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Visually or semantically separates content."""
|
||||
|
||||
tag = "Separator"
|
||||
|
||||
|
@ -12,7 +12,7 @@ from ..base import (
|
||||
|
||||
|
||||
class Slider(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Provides user selection from a range of values."""
|
||||
|
||||
tag = "Slider"
|
||||
|
||||
|
@ -11,7 +11,7 @@ from ..base import (
|
||||
|
||||
|
||||
class TabsRoot(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Set of content sections to be displayed one at a time."""
|
||||
|
||||
tag = "Tabs.Root"
|
||||
|
||||
@ -40,7 +40,7 @@ class TabsRoot(RadixThemesComponent):
|
||||
|
||||
|
||||
class TabsList(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Contains the triggers that sit alongside the active content."""
|
||||
|
||||
tag = "Tabs.List"
|
||||
|
||||
@ -49,7 +49,7 @@ class TabsList(RadixThemesComponent):
|
||||
|
||||
|
||||
class TabsTrigger(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""The button that activates its associated content."""
|
||||
|
||||
tag = "Tabs.Trigger"
|
||||
|
||||
@ -63,7 +63,7 @@ class TabsTrigger(RadixThemesComponent):
|
||||
|
||||
|
||||
class TabsContent(RadixThemesComponent):
|
||||
"""Trigger an action or event, such as submitting a form or displaying a dialog."""
|
||||
"""Contains the content associated with each trigger."""
|
||||
|
||||
tag = "Tabs.Content"
|
||||
|
||||
@ -72,7 +72,7 @@ class TabsContent(RadixThemesComponent):
|
||||
|
||||
|
||||
class Tabs(SimpleNamespace):
|
||||
"""Tabs components namespace."""
|
||||
"""Set of content sections to be displayed one at a time."""
|
||||
|
||||
root = __call__ = staticmethod(TabsRoot.create)
|
||||
list = staticmethod(TabsList.create)
|
||||
|
Loading…
Reference in New Issue
Block a user