File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 50
50
class Label (Item [V ]):
51
51
"""Represents a UI label within a modal.
52
52
53
+ This is a top-level layout component that can only be used on :class:`Modal`.
54
+
53
55
.. versionadded:: 2.6
54
56
55
57
Parameters
@@ -60,7 +62,7 @@ class Label(Item[V]):
60
62
description: Optional[:class:`str`]
61
63
The description text to display right below the label text.
62
64
Can only be up to 100 characters.
63
- component: Union[ :class:`discord.ui.TextInput`, :class:`discord.ui.Select`]
65
+ component: :class:`Item`
64
66
The component to display below the label.
65
67
id: Optional[:class:`int`]
66
68
The ID of the component. This must be unique across the view.
@@ -74,8 +76,7 @@ class Label(Item[V]):
74
76
The description text to display right below the label text.
75
77
Can only be up to 100 characters.
76
78
component: :class:`Item`
77
- The component to display below the label. Currently only
78
- supports :class:`TextInput` and :class:`Select`.
79
+ The component to display below the label.
79
80
"""
80
81
81
82
__item_repr_attributes__ : Tuple [str , ...] = (
Original file line number Diff line number Diff line change 43
43
class TextDisplay (Item [V ]):
44
44
"""Represents a UI text display.
45
45
46
- This is a top-level layout component that can only be used on :class:`LayoutView` or :class:`Section`.
46
+ This is a top-level layout component that can only be used on :class:`LayoutView`,
47
+ :class:`Section`, :class:`Container`, or :class:`Modal`.
47
48
48
49
.. versionadded:: 2.6
49
50
Original file line number Diff line number Diff line change 53
53
class TextInput (Item [V ]):
54
54
"""Represents a UI text input.
55
55
56
+ This a top-level layout component that can only be used in :class:`Label`.
57
+
56
58
.. container:: operations
57
59
58
60
.. describe:: str(x)
You can’t perform that action at this time.
0 commit comments