Swizzle with Context Provider? #9923
-
I've created a swizzle of the theme-classic I've swizzled the DocCardList and attempted to use
While the error is no longer thrown my Is it possible to Swizzle a Context Provider? Is there some logic here that I'm missing? Lastly, is there an easier way to accomplish my goal of building a DocCardList based on the top level pages (ie: there are no categories or folders in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You don't have to use context/provider for this, the component accepts props too. Just give it an hardcoded array of items as props and it will work. <DocCardList items={[]}/> Note: this is not publicly documented so we can't guarantee the shape of the items objects will remain retrocompatible forever. Using |
Beta Was this translation helpful? Give feedback.
Please open a bug report and we'll add automatic support for this
This temporary workaround should work:
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.