feat(v2): add custom props for consumption by swizzled sidebar (#3888)

This commit is contained in:
Oliver Ullman 2020-12-10 11:49:21 -07:00 committed by GitHub
parent 0b05806593
commit b11c24b752
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 11 deletions

View file

@ -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'}},
],
},
],
},