mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-23 14:06:59 +02:00
feat(v2): add custom props for consumption by swizzled sidebar (#3888)
This commit is contained in:
parent
0b05806593
commit
b11c24b752
6 changed files with 41 additions and 11 deletions
|
@ -361,6 +361,7 @@ describe('transformSidebarItems', () => {
|
|||
collapsed: false,
|
||||
label: 'Subcategory 1',
|
||||
items: [{type: 'doc', id: 'doc1'}],
|
||||
customProps: {fakeProp: false},
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
|
@ -372,7 +373,9 @@ describe('transformSidebarItems', () => {
|
|||
type: 'category',
|
||||
collapsed: false,
|
||||
label: 'Sub sub category 1',
|
||||
items: [{type: 'doc', id: 'doc3'}],
|
||||
items: [
|
||||
{type: 'doc', id: 'doc3', customProps: {lorem: 'ipsum'}},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -407,6 +410,7 @@ describe('transformSidebarItems', () => {
|
|||
collapsed: false,
|
||||
label: 'MODIFIED LABEL: Subcategory 1',
|
||||
items: [{type: 'doc', id: 'doc1'}],
|
||||
customProps: {fakeProp: false},
|
||||
},
|
||||
{
|
||||
type: 'category',
|
||||
|
@ -418,7 +422,9 @@ describe('transformSidebarItems', () => {
|
|||
type: 'category',
|
||||
collapsed: false,
|
||||
label: 'MODIFIED LABEL: Sub sub category 1',
|
||||
items: [{type: 'doc', id: 'doc3'}],
|
||||
items: [
|
||||
{type: 'doc', id: 'doc3', customProps: {lorem: 'ipsum'}},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue