Skip to content

Swizzle with Context Provider? #9923

Answered by slorber
AndrewSepic asked this question in Q&A
Discussion options

You must be logged in to vote

Please open a bug report and we'll add automatic support for this

This temporary workaround should work:

import DocCardList from '@theme/DocCardList';
import { useDocsSidebar } from '@docusaurus/theme-common/internal';

<DocCardList items={useDocsSidebar().items} />

https://stackblitz.com/edit/github-mu7uz9?file=docs%2Fintro.mdx

The above sandbox should work with just <DocCardList />, but currently it doesn't work: this is a bug.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@AndrewSepic
Comment options

@slorber
Comment options

slorber Mar 7, 2024
Collaborator

Answer selected by AndrewSepic
@AndrewSepic
Comment options

@slorber
Comment options

slorber Jan 16, 2025
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants