Fix docstring syntax in Tabs

This commit is contained in:
Darren Burns
2022-02-18 13:50:10 +00:00
parent 18a3fb4b57
commit 6c586c2e47
2 changed files with 4 additions and 3 deletions

1
docs/reference/tabs.md Normal file
View File

@@ -0,0 +1 @@
::: textual.widgets.tabs.Tabs

View File

@@ -28,7 +28,7 @@ class Tab:
Attributes:
label (str): The user-facing label that will appear inside the tab.
name (str | None): A unique string key that will identify the tab. If None, it will default to the label.
name (str, optional): A unique string key that will identify the tab. If None, it will default to the label.
If the name is not unique within a single list of tabs, only the final Tab will be displayed.
"""
@@ -182,7 +182,7 @@ class Tabs(Widget):
Args:
tabs (list[Tab]): A list of Tab objects defining the tabs which should be rendered.
active_tab (str | None): The name of the tab that should be active on first render.
active_tab (str, optional): The name of the tab that should be active on first render.
active_tab_style (StyleType): Style to apply to the label of the active tab.
active_bar_style (StyleType): Style to apply to the underline of the active tab.
inactive_tab_style (StyleType): Style to apply to the label of inactive tabs.
@@ -190,7 +190,7 @@ class Tabs(Widget):
inactive_text_opacity (float): Opacity of the text labels of inactive tabs.
animation_duration (float): The duration of the tab change animation, in seconds.
animation_function (str): The easing function to use for the tab change animation.
tab_padding (int | None): The padding at the side of each tab. If None, tabs will
tab_padding (int, optional): The padding at the side of each tab. If None, tabs will
automatically be padded such that they fit the available horizontal space.
search_by_first_character (bool): If True, entering a character on your keyboard
will activate the next tab (in left-to-right order) with a label starting with