mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge pull request #1812 from davep/more-reactive-types
Add a couple of extra type hints to reactives
This commit is contained in:
@@ -145,7 +145,7 @@ class Button(Static, can_focus=True):
|
||||
ACTIVE_EFFECT_DURATION = 0.3
|
||||
"""When buttons are clicked they get the `-active` class for this duration (in seconds)"""
|
||||
|
||||
label: reactive[RenderableType] = reactive("")
|
||||
label: reactive[RenderableType] = reactive[RenderableType]("")
|
||||
"""The text label that appears within the button."""
|
||||
|
||||
variant = reactive("default")
|
||||
|
||||
@@ -72,7 +72,7 @@ class Placeholder(Widget):
|
||||
_COLORS = cycle(_PLACEHOLDER_BACKGROUND_COLORS)
|
||||
_SIZE_RENDER_TEMPLATE = "[b]{} x {}[/b]"
|
||||
|
||||
variant: Reactive[PlaceholderVariant] = reactive("default")
|
||||
variant: Reactive[PlaceholderVariant] = reactive[PlaceholderVariant]("default")
|
||||
|
||||
_renderables: dict[PlaceholderVariant, str]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user