Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,24 @@ Ending paragraph

::::::

Tab set, within tab set:

::::::{tab-set}
:::::{tab-item} Label 1
::::{tab-set}
:::{tab-item} Label 1a
Content 1a
:::
:::{tab-item} Label 1b
Content 1b
:::
::::
:::::
:::::{tab-item} Label 2
Content 2
:::::
::::::

## `tab-set` options

class
Expand Down
2 changes: 1 addition & 1 deletion sphinx_design/dropdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class DropdownHtmlTransform(SphinxPostTransform):
def run(self):
"""Run the transform"""
document: nodes.document = self.document
for node in document.traverse(lambda node: is_component(node, "dropdown")):
for node in findall(document)(lambda node: is_component(node, "dropdown")):

# TODO option to not have card css (but requires more formatting)
use_card = True
Expand Down
3 changes: 2 additions & 1 deletion sphinx_design/tabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from sphinx.util.docutils import SphinxDirective
from sphinx.util.logging import getLogger

from ._compat import findall
from .shared import WARNING_TYPE, create_component, is_component

LOGGER = getLogger(__name__)
Expand Down Expand Up @@ -216,7 +217,7 @@ def run(self) -> None:
tab_item_id_base = "sd-tab-item-"
tab_item_id_num = 0

for tab_set in self.document.traverse(
for tab_set in findall(self.document)(
lambda node: is_component(node, "tab-set")
):
tab_set_identity = tab_set_id_base + str(tab_set_id_num)
Expand Down